Instagram basic display API - Getting Invalid platform app Error

♀尐吖头ヾ 提交于 2020-06-25 10:34:07

问题


I am getting Invalid platform app error while hitting oauth/access_token API on postman.

Note - for app_id i am using Instagram App Id.

Any solution for this?

{
    "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


回答1:


In pseudo code format you may wish to use following configuration for your request:

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");


来源:https://stackoverflow.com/questions/59163021/instagram-basic-display-api-getting-invalid-platform-app-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!