OAuthPermissionsException Instagram API in Sandbox

I figured out what was going on. One need to first change the scope of the authorization for the application. This is how I did it:

From your browser execute:

https://api.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=REDIRECT-URI&response_type=code&scope=SCOPE

Just need to insert your data for the words in uppercase

Once that is done, the application is authorized for that scope.

As I had already the access token, I did not need to do steps 2 and 3.


Here's a great example:

https://www.instagram.com/oauth/authorize?client_id=b23670e258o0fmk334jfu287c9f9953&redirect_uri=http://127.0.0.1:5000&response_type=code&scope=basic+public_content+follower_list+comments+relationships+likes

Simply add scope parameters at the end of the URL:

&scope=basic+public_content+follower_list+comments+relationships+likes