问题
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