Closed
Description
Issue Description
Since the old Instagram API will stop working on June 29 (See https://www.instagram.com/developer/), the url in
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
- 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
- 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'
- 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