1
votes

We are trying to use https://api.instagram.com/v1/users/{provider_user_id}/media/recent/?access_token={access_token}

to get a user's recent posts.

However, instgram says

Public Content - all remaining capabilities to read public media on a user's behalf on December 11, 2018

(https://www.instagram.com/developer)

So I guess we should be switching to new api soon.

But then, https://developers.facebook.com/docs/instagram-api says

The Instagram Graph API allows you to programmatically access Instagram Business Accounts so you can more easily manage media objects, view comments and metadata, and get insights and metrics with custom built apps.

If you are building apps for Instagram Non-Business Accounts, please use the Instagram Platform API instead.

We are trying to get non-business accounts info (via oauth2 access token) So we get to use the old api even after December 2018?

1

1 Answers

2
votes

You are using wrong url to get data

you need to use this URL: users/self/media/recent to get all media uploaded by user

Your url should be like : https://api.instagram.com/v1/users/self/media/recent?access_token='Your_access_token'

Make sure your access_token have that permission to get this data.

I have used This Repository to get media.