I am trying to access data related to a tag (let's call it "X") using Instagram API. I tried running it from Python and from the browser directly and got the same error:
{u'meta': {u'code': 400, u'error_type':u'OAuthPermissionsException',
u'error_message': u'This request requires scope=public_content, but this
access token is not authorized with this scope. The user must re-authorize
your application with scope=public_content to be granted this permissions.'}}
This is the simple Python code I wrote in order to first make it work:
import requests
access_token = 'zzzzzzzzzzzzz'
parameters = {"q": "X",
"scope": "public_content",
"access_token": "zzzzzzzzzzzzz"}
response = requests.get("https://api.instagram.com/v1/tags/search",
params=parameters)
insta_posts = response.json()
Am I using the right URL for a Sandbox? I read the Instagram API documentation and applications in Sandbox do not need any type of approval for a scope change.
Also, the application is authorized for Sandbox only: