First of all... I want to integrated authentication in my App for anyone Instagram users by oAuth.
After readed guide https://developers.facebook.com/docs/instagram-basic-display-api/getting-started, I added myself into Instagram Test User and then no have any problems to get token, user_id and carry out some actions into my App. But if I can do it by anyone Instagram users without my Instagram Test User, I get OAuthException with 400 status and error_message: "Invalid scope: []" on oauth/access_token method
For example, step-by-step:
Getting Instagram Authorization Form, write username, password https://api.instagram.com/oauth/authorize?app_id={app-id}&redirect_uri={redirect-uri}&scope=user_profile&response_type=code&state={state}
Then I would like to Exchange the Code For a Token. Send POST request https://api.instagram.com/oauth/access_token by data app_id={app-id}&app_secret={app_secret}&grant_type=authorization_code&redirect_uri={redirect_uri}&code={code} Parameter "code" getting from step 1.
And now I have token and user_id by JSON response after finished step 2.
So, If I carry out by my Instagram Test User I don't have any Exceptions, but If I can do it by another Instagram user, write other username, password on step 1, I'll get OAuthException
PS. I thought the API Instagram Basic Display product on my Facebook Application was probably not moderated by any competence developer. I sended statement, and received refusal: "Instagram profile permissions should not be used to authenticate new users in your app". So, What I am doing wrong?
UPD. On step 1, If i could make to log in distinctive username, password by another Instagram user, I don't receive the "code" - necessary parameter on step 2.
If your app is still in Development Mode, then you have to add Instagram users in My Apps > Roles > Instagram Testers. And those Instagram Users have to Accept the Tester Invite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With