Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Instagram Profile Picture via API? [closed]

Tags:

How do I extract an Instagram Profile picture using Instagram API? The basic graph API doesn't contain profile picture and the legacy API has been discontinued.

like image 282
Yash Arora Avatar asked Apr 29 '18 13:04

Yash Arora


People also ask

Does Instagram API still work?

In 2018, Instagram shut down its public API. Meaning, third-party apps can no longer access the API from Instagram without permission. Third-party apps now need to be approved by Instagram before they can access the API.

What information can I get from Instagram API?

The API can be used to get and publish their media, manage and reply to comments on their media, identify media where they have been @mentioned by other Instagram users, find hashtagged media, and get basic metadata and metrics about other Instagram Businesses and Creators.

How to connect to the Instagram API?

How to Connect to the Instagram API. 1 Go to Instagram developer page. 2 Click on Register Your Application. 3 Click on Register a New Client. 4 Fill the form and click on Register. 5 Go to Clients manager. 6 Click on Manage in your application block. 7 Copy and save your credentials: Client ID and Client Secret.

What is Instagram basic display API and how does it work?

What does it do? Instagram Basic Display API enables your app to let people import their media from Instagram, connect their Instagram profiles, and more. Who is it for? Anyone on Instagram - owners of Instagram Personal, Business, and Creator accounts.

How do I read a user’s profile on Instagram?

When you register an app on Instagram, you’ll get an access token with basic authorization, which means that you will be able to read a user’s profile info and media. Other API functions require additional permission. Here’s the breakdown of the token authorizations: public_content – to read any public profile info and media on a user’s behalf

What happened to Instagram’s API?

As of June 2016, Instagram restricted a lot of access to their API. While this was likely a business decision on their part to increase Instagram downloads over third-party apps, Instagram’s change makes it trickier to know what you can and can’t build as a developer.


1 Answers

Use one of these URL

  • https://www.instagram.com/USERNAME/?__a=1
  • https://i.instagram.com/api/v1/users/USER_ID/info/

NOTE: To get Instagram USER_ID, use first URL with Instagram USERNAME

Edit: If you use second URL, you need to put some user-agent with your request. This is How I do with cURL.

curl -s -H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 12_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Instagram 105.0.0.11.118 (iPhone11,8; iOS 12_3_1; en_US; en-US; scale=2.00; 828x1792; 165586599)' https://i.instagram.com/api/v1/users/USER_ID/info/ 
like image 180
Chhaileng Avatar answered Sep 22 '22 05:09

Chhaileng