'Why is the error "Invalid scope: []" returned for users whose Instagram Basic Display is not added as "instagram testers"?

I'm trying to pull user's profile and media data using Instagram Basic Display. When I add an Instagram account as Instagram Testers, I can login without any problem and pull profile and media data.

When I submitted my iOS app to Instagram Review, they told me they couldn't log in. So, according to the document, they cannot switch to the "Authorization Window" screen. This led me to conclude that the authentication process was unsuccessful.

I'm getting the same error when I try to log in with an Instagram account that I haven't added as Instagram Testers, but I think it's normal since it hasn't been reviewed yet.

According to the document, the authorization url I use is as follows;

https://api.instagram.com/oauth/authorize/?client_id=Instagram App ID&redirect_uri=https://us-central1-blablabla.cloudfunctions.net/auth/&scope=user_profile,user_media&response_type=code

Instagram login redirects but when I log in I get the following error;

{"error_type": "OAuthException", "code": 400, "error_message": "Invalid scope: []"}

They also get this error when I post it on Instagram Review.

There is nothing on how I can solve it because everything works normally for the user added as Instagram Testers.

Also, when I sent the application in Development and Live mode, I got rejected.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source