The Database Hub | Back4App
The Database Hub | Back4App
How it works
  • Log In
  • Sign Up

  1. Back4App
  2. Parse
Public

16
308
16
308
  • DatabaseDatabase
  • GraphQL API PlaygroundAPI Playground
  • Get Started GuideGet Started
  • IssuesIssues
  • ContributorsContributors
  • Database
    Database
    GraphQL API Playground
    API Playground
    Get Started Guide
    Get Started
    Contributors
    Contributors

  1. IssueOpen
  2. SignUp/Login with Instagram

New IssueNew

marten.schwarzmann commented this issue on Jun 2020

I'm trying to signUp users via Instagram. The steps I'm currently performing:

  1. Getting the authentication_code from authorization window
  2. Get a short-lived token
  3. Get a long-lived token
  4. Try to register new user via CURL

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:

GET 'https://graph.instagram.com/me?fields=id,username,account_type,media_count,media&access_token=ACCESS_TOKEN'

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!

Closed Issuemarten.schwarzmann closed this issue on Jun 2020
Active Issuemarten.schwarzmann reopened this issue on Jun 2020
natalia commented this issue on Jul 2020

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.

Please enter a comment for this issue.