I'm trying to signUp users via Instagram. The steps I'm currently performing:
curl --location --request POST 'https://parseapi.back4app.com/classes/_User' \ --header 'X-Parse-Application-Id: PARSE_APP_ID' \ --header 'X-Parse-REST-API-Key: PARSE_REST_API_KEY' \ --header 'X-Parse-Revocable-Session: 1' \ --header 'Content-Type: application/json' \ --data-raw '{ "authData": { "instagram": { "id": "INSTAGRAM_USER_ID", "access_token": "LONG_LIVED_USER_TOKEN", "apiURL": "https://api.instagram.com/v1/" } } }'
I always get the same response with error code 404:
{ "code": 101, "error": "Instagram auth is invalid for this user." }
The respective Instagram Account is registered as "instagram-tester" in the facebook developer console. I also checked my implementation with the (deprecated) tutorial which can be found here: https://www.back4app.com/docs/platform/instagram-oauth-tutorial
Do you have any suggestions why my request fails? Seems like parseServer calls a deprecated URL: https://github.com/parse-community/parse-server/blob/master/src/Adapters/Auth/instagram.js Think this should be something like this:
Instead of
GET 'https://api.instagram.com/v1/users/self/?access_token=ACCESS_TOKEN'
which leads to
{ "meta": { "code": 400, "error_type": "OAuthAccessTokenException", "error_message": "The access_token provided is invalid." } }
Best regards!
Hi! Since October 15, 2019, new client registration and permission review on Instagram API platform is discontinued in favor of the Instagram Basic Display API, can you please take a look at the following documentation?
https://www.back4app.com/docs/platform/instagram-basic-display-api
Let me know the results of your tests.