Reputation: 1
For a long time to get this error please guide
<?php
$address = "https://api.instagram.com/oauth/access_token";
$c = curl_init();
curl_setopt($c,CURLOPT_URL,$address);
curl_setopt($c,CURLOPT_POST, TRUE);
curl_setopt($c,CURLOPT_POSTFIELDS,
"grant_type=authorization_code
&client_id=123456
&client_secret=12346
&redirect_uri=http://site.ir?GO=instagram
&code=1234556
");
$send = curl_exec($c);
?>
Error code
error_type": "OAuthException", "code": 400, "error_message": "Invalid grant_type"
please guide me
Upvotes: 0
Views: 240
Reputation: 1026
Instagram changed the way how you obtain valid access token for given Instagram account. Please follow instructions on their official documentation. You will not be able to obtain access token the way you are trying.
Upvotes: 1