Search code examples
xcodeoauthinstagraminstagram-api

Instagram API: Get User's Info (on iOS)


My app is able to get the AccessToken after the user logs into Instagram, and Instagram calls back to my app.

I now want to get the user's information, most importantly his/her username.

All I have is the access token. I couldn't find a call that gives the current user's information without passing the {user-id} to it. For Example:

https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN

How do you get this information with just the AccessToken (like Twitter, Facebook, Tumblr, etc.)?


Solution

  • To get the user details for the current logged in user, use "self" as the user-id. For example: https://api.instagram.com/v1/users/self/