Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get images using Instagram API

How to get users images from Instagram API?

access_token=4049241557.1677ed0.5324ad17d9314645b528ad112da8d56e

But no success, it's giving me only user info. How can I get images using Instagram API?

like image 906
adeel ali Avatar asked Feb 06 '23 21:02

adeel ali


1 Answers

Use this API:

https://api.instagram.com/v1/users/self/media/recent?access_token={access-token}

This will get your photos,(but it looks like from the access_token you have posted, that user does not have any photos posted, so it will return empty array)

Use this to get other user's photo:

https://api.instagram.com/v1/users/{user-id}/media/recent?access_token={access-token}

you should have authenticated with public_content scope and if you are in sandbox mode, only sandbox users can be accessed until your app is reviewed and live

like image 122
krisrak Avatar answered Feb 08 '23 11:02

krisrak