I am trying to work with the Instagram Basic Display API and I am getting stuck at obtaining a long-lived access token. Hoping some of you folks can help me narrow down my issue. Ive been making my way through Meta for Developers ‘Get Started’, currently stuck on Step 5: Exchange the Code for a Token:
I’ve made it to the point where you can click to authenticate the Instagram test user, to which you get a redirected URI with an ‘authorization code’ appended to it. I then take that code and make a POST to https://api.instagram.com/oauth/access_token with the following params:
client_id={insta-app-id}
client_secret={insta-app-secret}
grant_type=authorization_code
redirect_uri={redirect-uri} code={authorization-code}
I then get this response: { "error_type": "OAuthException", "code": 400, "error_message": "Missing required field client_id" }
And if you find it helpful, this is more info about my approach:
Everything seems perfect. Try an attempt on postman or web browser.