Instagram基本显示API-获取无效的平台应用程序错误

问题描述 投票:5回答:1

我在邮递员上击中oauth / access_token API时收到无效的平台应用程序错误。

注意-对于app_id,我正在使用Instagram App ID。

对此有任何解决方案?

{
    "error_type": "OAuthException",
    "code": 400,
    "error_message": "Invalid platform app"
}

https://api.instagram.com/oauth/access_token?app_id=54219xxxxx359344&app_secret=190fac2eaacxxxxxxxxxd83e1cc0c382ec7&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fankush2016.github.io%2F&code=AQBSckcUcZ6edpLQlnt2NBCFgfhyJYfEBNW_cFlseJ0R7P2fisA3OWAMU8-BJXbFh0RrKdX0Z7ccrpK7rbZOyQID8epfqcpIGGbUn4oAcdC-sCBYEn2nvuPpjlXoSg5Quv-lq1uiucbqIGKoxH0mDkKDp_QKxxxxxxxxxxxxxxxxxxxxelPn1FoVJqSWqaKbVDtt9rdDlP4n0-aRg__exYWGJ8vqKnp_8dGNxg

postman instagram instagram-api instagram-graph-api
1个回答
0
投票

以伪代码格式,您可能希望对请求使用以下配置:

baseURL = "https://api.instagram.com/oauth/access_token"

append = "client_id=\(API.INSTAGRAM_CLIENT_ID)&client_secret=\(API.INSTAGRAM_CLIENTSERCRET)&grant_type=authorization_code&redirect_uri=\(API.INSTAGRAM_REDIRECT_URI)&code=\(code)"

  request.httpMethod = "Post"
  request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField:"Content-Type");
© www.soinside.com 2019 - 2024. All rights reserved.