0

Here is Postman request and response

screenshot Postman request/response

I'm trying to get code first from this URL:

https://api.instagram.com/oauth/authorize?client_id="My ClientID"&redirect_uri='my redirctUri'/&scope=user_profile,user_media&response_type=code&grant_type=authorization_code

Then I got code like that: https://myredirctCode?code=MyCode#_

Copy that code and paste on Postman collection and getting error

also I'm following How do I recive instagram log in token using ajax answer to change response type to token

And I'm getting this response

screenshot response

I'm using Instagram page for displaying.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Chmn
  • 11
  • 5
  • It looks like you are sending GET instead of POST parameters there in Postman. – CBroe May 05 '22 at 12:00
  • Hi @CBore, Thanks for reply. When I'm getting code then my request is Get , and when get accessToken the Post Can you please explain which one request you mention? – Chmn May 05 '22 at 12:08
  • 1
    Your POST request to `https://api.instagram.com/oauth/access_token` should send the `client_id`, `client_secret`, etc. within the body of the request. You are currently sending them through the query params, which is not what the API expects. See [the documentation](https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-access-tokens-and-permissions#step-2--exchange-the-code-for-a-token) for details. – 3limin4t0r May 05 '22 at 12:27
  • Hi @3limin4t0r, Thanks for reply, Men you don't have idea but you save my another day. I'm trying to solving this from since 2 days Thanks a lot ! – Chmn May 05 '22 at 12:41

0 Answers0