Thursday 17 December 2015

How to get instagram user id and access token

Get user id by user name through below Steps :-
Login with instagram account

https://www.instagram.com/developer/

create client_id and secret_key and  request_url

After that you should pass client_id and request_url in this url

https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token

we get access_token like this

http://your-redirect-uri#access_token=ACCESS-TOKEN

now you should pass token for find user information like this

https://api.instagram.com/v1/users/self?access_token=access_token

{"data": {"id": "XXXXX", "username": "XXXX", "profile_picture": "XXXX", "full_name": "Naresh Chaudhary", "bio": "", "website": "", "is_business": false, "counts": {"media": 4, "follows": 6, "followed_by": 52}}, "meta": {"code": 200}}  

No comments:

Post a Comment