Skip to content

Instagram

Damien edited this page May 28, 2016 · 4 revisions
// Client-side (implicit) flow
let instagram: Provider = .Instagram(
    clientID: "***",
    redirectURL: "foo://callback"
)

// Server-side (explicit) flow
let instagram: Provider = .Instagram(
    clientID: "***",
    clientSecret: "***"
    redirectURL: "foo://callback"
)
Token
// Client-side (Implicit) flow
http://your-redirect-uri#access_token=ACCESS-TOKEN

// Server-side (Explicit) flow
{
    "access_token": "fb2e77d.47a0479900504cb3ab4a1f626d174d2d",
    "user": {
        "id": "1574083",
        "username": "snoopdogg",
        "full_name": "Snoop Dogg",
        "profile_picture": "..."
    }
}
Scopes
  • basic - to read a user’s profile info and media
  • public_content - to read any public profile info and media on a user’s behalf
  • follower_list - to read the list of followers and followed-by users
  • comments - to post and delete comments on a user’s behalf
  • relationships - to follow and unfollow accounts on a user’s behalf
  • likes - to like and unlike media on a user’s behalf
Authorization Request Parameters
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
Token Request Parameters
  • client_id: your client id
  • client_secret: your client secret
  • grant_type: authorization_code is currently the only supported value
  • redirect_uri: the redirect_uri you used in the authorization request. Note: this has to be the same value as in the authorization request.
  • code: the exact code you received during the authorization step.
Clone this wiki locally