Instagram communication (POST) api not working in iOS app

I am developing an iOS app for iPhone using the Instagram API where a user allows to follow another user account using the Instagram Relationship API and I always get an error for this API request:

API request:

https://api.instagram.com/v1/users/157xxxx469/relationship?access_token=169527xxxx.f71bc56.fb2a414a0ee7469ca381a3659f5cxxxx

Answer received:

{
  "meta": {
    "error_type": "OAuthPermissionsException",
    "code": 400,
    "error_message": "This request requires scope=relationships, but this access token is not authorized with this scope. The user must re-authorize your application with scope=relationships to be granted write permissions."
  }
}

      

When I login with the scope at login time, I use the url below to request:

https://api.instagram.com/oauth/authorize/?client_id=56a6xxxx6a8b41f288477fxxxxea253e&redirect_uri=http://localhost:8888/MAMP/&response_type=token&scope=likes+comments+relationships

But I'm surprised that users are only requesting access to basic informational permission, not relationships, comments, etc.

Please refer to the screenshot below:

enter image description here

I cannot tell if I was privileged or not to use the Instagram Links API; how can i check this?

Also, what am I doing wrong and how can I solve it?

+3


source to share


1 answer


Once approved, you will see permission on the authorization screen, for example:

Follow/Unfollow other users



enter image description here

+2


source







All Articles