我正在开发一个与Instagram API集成的应用程序来访问用户信息.我使用authorize url成功获取了访问令牌,但无法使用access_token url获取userId:
我尝试了两个端点:
https://api.instagram.com/oauth/access_token?client_id=48275564e2c445f6b8e1356djfha3e0c&client_secret=ab2062da9f314e3489dke7ae9cbe6e5d&redirect_uri=http://localhost&grant_type=authorization_code
Run Code Online (Sandbox Code Playgroud)
https://api.instagram.com/oauth/access_token
与邮政机构一样:
client_id=48275564e2c445f6b8e1356djfha3e0c&client_secret=ab2062da9f314e3489dke7ae9cbe6e5d&redirect_uri=http://localhost&grant_type=authorization_code&code=1351860224.4827556.5dc92c4d15ea4a4ea1b0d33eaf0eef19
Run Code Online (Sandbox Code Playgroud)
(请求中的数据被修改),但我得到了以下内容
{
"code": 400,
"error_type": "OAuthException",
"error_message": "No matching code found."
}
Run Code Online (Sandbox Code Playgroud)
我已经看到了大量的查询和问题,但找不到任何问题的解决方案.
我有几个问题是:
1) is the field code in the URL is same as access_token, if not how could i get the code field's value.
2) is there any other mechanism(API) to fetch the user details given the username is not known.
Run Code Online (Sandbox Code Playgroud)
请帮助我,因为我完全陷入困境并且完成了我的截止日期.