Reputation: 481
Getting an error when calling a POST at this endoint. https://api.instagram.com/oauth/authorize
This is the request body:
{
"client_id": "62022....13674",
"client_secret": "081f5d8d8d0.....cfbe88d8df1bf1",
"grant_type": "authorization_code",
"redirect_uri": "https://mystifying-khorana-f72562.netlify.com/",
"code": "AQA6nvV5uJ1PEblnIy2lEx0e6IMc6rOAmnW0Rx6_nVHwQn1IYUp85hRd2rbB9K-BC0877g5Djhy9QjqqD-ImRFPwz0HJDgNEOwD4w5qltzNGYQyoFQd7ttyS9E1E61JdsFduGLXzTU2b8X8vICd_KaJDXeFL9drc8uickz3yy-UaziuKLbExqcMfeEubRcwVnPQFwyLQUnQgcljgXyvV5eeGADgVZYXvZ7Lb7REtyOXReA"
}
This is the error that gets returned:
{
"error_type": "OAuthException",
"code": 400,
"error_message": "Invalid platform app"
}
It may be something simple but I cannot figure out what is wrong. I followed the getting started piece line by line. https://developers.facebook.com/docs/instagram-basic-display-api/getting-started
Upvotes: 2
Views: 899
Reputation: 663
You are POST
ing to the wrong URL. You need to send that request to: https://api.instagram.com/oauth/access_token
to exchange the code for an access token.
Upvotes: 1