Answer the question
In order to leave comments, you need to log in
How to get instagram access_token using Server-side (Explicit) Flow?
I get a code. Next, the "code" needs to be sent as a POST request to instagram with additional arguments.
curl -F 'client_id=CLIENT_ID' \
-F 'client_secret=CLIENT_SECRET' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=AUTHORIZATION_REDIRECT_URI' \
-F 'code=CODE' \
https://api.instagram.com/oauth/access_token
{
"access_token": "fb2e77d.47a0479900504cb3ab4a1f626d174d2d",
"user": {
"id": "1574083",
"username": "snoopdogg",
"full_name": "Snoop Dogg",
"profile_picture": "..."
}
}
var data = {
client_id:config.ClientID,
client_secret:config.ClientSecret,
response_type:'token',
redirect_uri:config.redirect_url,
code:code
}
request.post({url:'https://api.instagram.com/oauth/authorize', formData:data}, function (err, res, body) {...});
followAllRedirects:true
(follow redirects), it began to return an html page with a bunch of styles, scripts and the insta logo in the center. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question