Instagram oauth api 给出 { "code": 400, "error_type": "OAuthException", "error_message": "No matching code found."} [英] Instagram oauth api gives { "code": 400, "error_type": "OAuthException", "error_message": "No matching code found." }

查看:34
本文介绍了Instagram oauth api 给出 { "code": 400, "error_type": "OAuthException", "error_message": "No matching code found."}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个与 Instagram API 集成以访问用户信息的应用程序.我使用授权 url 成功获取了访问令牌,但无法使用 access_token url 获取用户 ID:

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:

我尝试了两个端点:

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://本地主机&安培; grant_type = authorization_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 给出 { "code": 400, "error_type": "OAuthException", "error_message": "No matching code found."}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆