The Wayback Machine - https://web.archive.org/web/20200829112641/https://github.com/parse-community/parse-server/issues/6728
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to use new Instagram API #6728

Open
mschwarz8 opened this issue Jun 4, 2020 · 3 comments
Open

Not possible to use new Instagram API #6728

mschwarz8 opened this issue Jun 4, 2020 · 3 comments

Comments

@mschwarz8
Copy link

@mschwarz8 mschwarz8 commented Jun 4, 2020

Issue Description

Since the old Instagram API will stop working on June 29 (See https://www.instagram.com/developer/), the url in

const path = `${apiURL}users/self/?access_token=${authData.access_token}`;
needs to be changed to match the new "instagram_graph_user_profile" API. (See https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-profiles-and-media).
The new default URL should be something like this:
https://graph.instagram.com/me?fields=id&access_token=ACCESS_TOKEN

Steps to reproduce

  1. Get the authentication_code from authorization window
    https://www.instagram.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&scope=user_profile,user_media&response_type=code
  2. Get a short-lived token
curl --location --request POST 'https://api.instagram.com/oauth/access_token' \
--form 'client_id=CLIENT_ID' \
--form 'client_secret=CLIENT_SECRET' \
--form 'grant_type=authorization_code' \
--form 'redirect_uri=REDIRECT_URI' \
--form 'code=AUTHORIZATION_CODE'
  1. Trying to register new user via ParseServer will perform following call:
curl --location --request GET 'https://api.instagram.com/v1/users/self?access_token=SHORT_LIVED_ACCESS_TOKEN'

Expected Results

User is being verified successfully and user can be registered via Instagram.

Actual Outcome

ParseServer receives following:

{
    "meta": {
        "code": 400,
        "error_type": "OAuthAccessTokenException",
        "error_message": "The access_token provided is invalid."
    }
}

and returns

{
    "code": 101,
    "error": "Instagram auth is invalid for this user."
}

to developer.

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 3.9.0
    • Operating System: Back4App
    • Hardware: Back4App
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Back4App
  • Database

    • MongoDB version: Back4App
    • Storage engine: Back4App
    • Hardware: Back4App
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Back4App

Logs/Trace

No logs

@mtrezza
Copy link
Contributor

@mtrezza mtrezza commented Jul 2, 2020

Thanks for reporting this. Do you thin you could tackle this and open a PR?

@ruhci28
Copy link

@ruhci28 ruhci28 commented Jul 16, 2020

hye is this issue still open .?

@TomWFox
Copy link
Member

@TomWFox TomWFox commented Jul 18, 2020

@ruhci28 yep, it hasn't been addressed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.