Ajax 通过http请求从Naver LINE API获取信息

Ajax 通过http请求从Naver LINE API获取信息,ajax,Ajax,我在聊天软件Naver LINE上有个问题。有一个API提供登录身份验证,称为LINE login 我已经按照文档上的说明运行了querystring,我得到了一个回调URL,它给出了如下代码 https://sample.com/callback?code=b5fd32eacc791df&state=123abc 数据是我输入的凭证,以便该行将用户信息传递给我 我做错什么了吗?如果是,我如何解决这个问题 谢谢 XMLHttpRequest cannot load https://api.lin

我在聊天软件Naver LINE上有个问题。有一个API提供登录身份验证,称为LINE login

我已经按照文档上的说明运行了querystring,我得到了一个回调URL,它给出了如下代码

https://sample.com/callback?code=b5fd32eacc791df&state=123abc 数据是我输入的凭证,以便该行将用户信息传递给我

我做错什么了吗?如果是,我如何解决这个问题

谢谢

XMLHttpRequest cannot load https://api.line.me/v1/oauth/accessToken/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxx' is therefore not allowed access. The response had HTTP status code 404.
$.ajax({
      url: "https://api.line.me/v1/oauth/accessToken/",
      type: "POST",
      xhrFields: {
        withCredentials: true
      },
      crossDomain: true,
      data: JSON.stringify(data),
      dataType: "json",
      success: function (response) {
        var resp = JSON.parse(response)
        alert(resp.status);
      },
      error: function (xhr, status, state, error) {
        alert("error", xhr, status);
        console.log(xhr);
        console.log(status);
        console.log(state);
        console.log(error);
      }
    });