3
votes

Querying the Instagram API in Sandbox mode for getting the media liked by the user related to the token, I get no data. Of course the user is authorized to use the App in Sandbox.

GET: https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN (Indeed the ACCESS-TOKEN part is substituted with the real token get after the Authorization.)

Response: {"pagination": {}, "meta": {"code": 200}, "data": []}

Am I getting nothing because is in Sandbox mode or am I missing something?

2
I'm getting the same issue. Did you manage to resolve it?Isuru
No really.. still with the same problem and I'm looking for a way to get "noticed" by the Instagram devs..Luigi T.
I also submitted a bug report through the support but didn't head back from them still.Isuru

2 Answers

2
votes

Sorry, I couldn't comment under your question because I don't have 50 reputation yet. However, if you have not submitted your app for review yet, then you don't have the public_content scope, which is required if you want to use the endpoint https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN.

According to Instagram API Documentation:

The OAuth 2.0 specification allows you to specify the scope of the access you are requesting from the user. All approved apps have basic access by default, but if you plan on asking for extended access such as reading public content, liking, commenting, or managing friendships, you will need to specify these scopes in your authorization request. Note that in order to use these extended permissions, you must first submit your app for review.

After you have gained permission to public_content, then you should be able to get the dataset from Instagram.

1
votes

Did you figure it out? I had the same issue with #tags and just popped this in the browser.

https://api.instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&scope=public_content

The main factor being the scope=public_content.

Obviously you need to change the capitalised parts, but that should get you what your after.

Seeing as you are in sandbox mode and only requesting liked media, I thought Instagram wouldnt require app approval?