Instagram oauth api给出{“代码":400,"error_type":"OAuthException","error_message":“找不到匹配的代码". } [英] Instagram oauth api gives { "code": 400, "error_type": "OAuthException", "error_message": "No matching code found." }
问题描述
我正在开发一个与Instagram API集成以访问用户信息的应用程序.我使用授权url成功获取访问令牌,但无法使用access_token url获取userId:
I am working on an application that integrates with Instagram API to access the user information. I successfully fetch the Access Token using the authorize url but unable to fetch the userId using access_token url:
我在两个端点上都被尝试过
i am tried both the endpoints:
https://api.instagram.com/oauth/access_token?client_id=48275564e2c445f6b8e1356djfha3e0c&client_secret=ab2062da9f314e3489dke7ae9cbe6e5d&redirect_uri=http://localhost&grant_type=authorization_code
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
(请求中的数据已修改),但是我越来越关注
(The data in the request is modified), But i am getting the follwing
{
"code": 400,
"error_type": "OAuthException",
"error_message": "No matching code found."
}
我看到了无数的查询和问题,但是找不到解决问题的方法.
I have seen tons of queries and questions but could not find any solution to the problem.
我有两个问题:
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.
请帮助我,因为我完全陷入困境,并且快要完成工作了.
Please help me as i am completely stuck and running out my deadlines.
推荐答案
对我来说,取消选中instagram开发人员中的禁用隐式OAuth ->管理客户端可解决此问题
For me unchecking Disable implicit OAuth in instagram developer -> manage clients fixed the issue
这篇关于Instagram oauth api给出{“代码":400,"error_type":"OAuthException","error_message":“找不到匹配的代码". }的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!