我正在尝试使用Instagram OAuth,其开发人员文档位于
https://developers.facebook.com/docs/instagram-basic-display-api/getting-started
第1步和第2步工作正常,没有任何问题,因此我有我的Client-ID、Client-Secret、Redirect-URI和代码。
18我正在尝试使用Instagram OAuth,其开发者文档位于
https://www.instagram.com/developer/authentication/。
第1步和第2步工作正常,没有任何问题,因此我有我的Client-ID、Client-Secret、Redirect-URI和代码。
但每次我尝试获取Acces令牌时,我都会收到以下错误:
{ " code ":400,"error_type":"OAuthException","error_message":“找不到匹配的代码或该代码已被使用。”}
有什么建议如何解决这个问题吗?
发布于 2019-11-09 23:05:34
按照你发布的Facebook链接而不是Instagram中的说明操作(它们不适用于新的API):
用户授权重定向:
https://api.instagram.com/oauth/authorize
?app_id={app-id}
&redirect_uri={redirect-uri}
&scope=user_profile,user_media
&response_type=code将返回的代码交换为令牌:
curl -X POST \
https://api.instagram.com/oauth/access_token \
-F app_id={app-id} \
-F app_secret={app-secret} \
-F grant_type=authorization_code \
-F redirect_uri={redirect-uri} \
-F code={code}https://stackoverflow.com/questions/58778167
复制相似问题