2. If this is for you?
Instagram API Platform is useful to
1. Individuals to share their content
2. For Brands and Advertisers
3. Broadcasters and Publishers
3. Make sure all requests to the API must be made over SSL(https://
and not http://)
Instagram API require you to authenticate user first before
making any calls to API Endpoints.
You can make use of either Server-side flow(more secure) or
implicit flow(less secure) for redirecting users.
Secure or not?
4. Server-Side(Explicit) Flow
Steps for Server-Side(Explicit) Flow
1. Direct user to Instagram Authorization URL
2. Receive the redirection URL from Instagram
3. Request the access_token
In the last step you would exchange code for an access
token.
5. Client-Side(Implicit) Authentication
This method would be used in cases where you don’t have
server side component.
Steps for Client-Side Authentication
1. Direct user to Instagram Authorization URL
2. Get access_token from the URL fragment
6. Scopes(Permissions)
Instagram supports following scopes
1. basic - get user’s profile and media
2. public_content - get user’s public profile and media
3. follower_list - get list of followers and followed-by users
4. comments - post and delete comments
5. relationships - follow and unfollow accounts
6. likes - like and unlike media
Note: Do not ask user to grant more permissions than you
want in your Web or App solution.
7. Permissions Review & Why it’s Important?
You start with Sandbox mode and it provides you
access to all API endpoints but for a limited number
of users and media.
Instagram would review your app and grant full
access to Instagram content only after approving
your app.
8. Must Know Facts about App Approval
Criteria for Review
Instagram will not approve your app in following cases
1. If you are using a widget
1. If you are to use only for one time
1. Just to showcase content on personal Website
9. API Endpoint Groups
1. Users
Self, about other users, most recent content of the current
or any user, liked by user and search for user by name
1. Relationships
following, followers, requests for follow, relationship with
other user and modify relationship with other user
10. API Endpoint Groups
3. Media
get media info by media-id, shortcode or search for
media
4. Comments
get list of recent comments, add comment, remove
comment
11. API Endpoint Groups
5. Likes
Get a list of users who liked, set or remove like for media for
current user
6. Tags
Get info about tag object, list of recently tagged media,
search for tag by name
7. Locations
Get info about location, get a list of media objects for a
location and search for a location by coordinates
12. Rate Limits
Instagram considers rate limits for each access token and 1
hour window.
For Sandbox current limit is 500 calls per hour while for Live
App it is 5000 per hour.
13. User Subscriptions
You can create, delete and list subscriptions using
subscriptions endpoint.
With User subscriptions you will get notified when
users who are authenticated by your app posts new
media on instagram.
14. Embedding
Embedding can save lot of your time and efforts for creating custom UI
when you can just add by writing few lines of code.
Instagram provides embed code for the post of your choice to embed in
your website or using wordpress.
Instagram provides two ways to programmatically add Instagram post to
your webpage : oEmbed endpoint or URL append endpoint.
Note: Instagram uses its own embeds.js library for embedding.
15. Mobile Sharing
For both iPhone and Android Instagram provides
easy to implement method for Sharing.
For iOS use custom URL schemes for sharing and
for Android use Intents to post photos and videos.
16. Code Library
Instagram currently provides Python and Ruby
libraries for rest like PHP, Java and Swift one is
always free to contribute.