i am updating my instagram api and i created a new...
# cfml-general
g
i am updating my instagram api and i created a new app in gacebook console and used the appID but i am always getting the error
Copy code
{
  "error_type": "OAuthException",
  "code": 400,
  "error_message": "Invalid platform app"
}
Copy code
<https://api.instagram.com/oauth/authorize?client_id=**************&redirect_uri=https://yz.com/instaAuth.cfm&scope=user_profile,user_media&response_type=code&state=#session.clientID#>
any clue what i am doing wrong here
e
not familiar with that API, but here is what chatgpt had to offer:
Copy code
1. Check Instagram App Configuration
Verify the App Status: Ensure the app is in "Live" mode. Apps in "Development" mode can only be used by users who are listed as testers, developers, or admins in the app's settings.
Platform Settings: Confirm that you've set up the correct platform (e.g., "Website") and included the correct domain for the redirect URI.
2. Redirect URI Mismatch
The redirect_uri you specify in the OAuth request must exactly match one of the redirect URIs configured in the app settings.
Go to Facebook Developer Console > Your App > Instagram > Settings > Basic.
Add <https://yz.com/instaAuth.cfm> as a valid redirect URI.
3. Permissions and Scopes
Confirm that the requested scopes (user_profile, user_media) are granted to your app. If the app is in development mode, ensure that these permissions are explicitly enabled for testing.
4. Use the Correct App Type
Ensure you are using an Instagram Basic Display API app or an Instagram Graph API app, depending on your needs. This error can occur if you attempt to use the wrong API type.
5. Client ID Issues
Double-check that you are using the Instagram App ID (not Facebook App ID).
If you're testing, ensure the user making the request is added as a tester in your app settings.
g
i checked everything you said but i am bit confused on this 5. Client ID Issues Double-check that you are using the Instagram App ID (not Facebook App ID). If you're testing, ensure the user making the request is added as a tester in your app settings. because it does not specify where is the instagram API , i believe this could be the reason, even it sets up in facebook meta console, bt there seems no way i am finding how this is working for instagram, any screenshotr would be helpful
e
like i said that is just what ChatGPT spit back, so take the context and meaning with a grain of salt. i would try to contact instragram support as a next step
r
@gsr have you tested using Postman to make sure you are accessing the instagram API properly? It is possible that either your endpoint is no longer correct for how you are making the call or they disabled the type of call you are making. If you get it working in postman, then you should be able to use the head and body elements from postman to make the cfhttp call
m
There is a list of Instagram APIs. May I ask which one are you using please? https://developers.facebook.com/products/instagram/apis/ Also, since you mentioned that you are "updating" your instagram API, I take that you have been using Instagram for some time. With that said, just in case you may be using the Instagram Basic Display API. According to https://developers.facebook.com/docs/instagram-basic-display-api/, they had announced the deprecation of the Instagram Basic Display API back in September of this year. Starting December 4 of this year, all requests made to the Instagram Basic Display API will return an error. So, if you are still using the Instagram Basic Display API, that's the reason for your error.
g
i have this setup i do not see anyway where the instagram thing i can find
r
still suggest you try postman to hit the API w/ your current settings and see what result you get. If it doesn't work, try different endpoints to see if you can get any to work. Debug from there.
g
the same erro i posted
r
what about the "current" endpoints? Have you tried them?
Does instagram require that you register the outbound redirect URI or server to ensure it is valid for your client? If so- check to make sure it matches what you are sending. I have seen this when the dev URI is not setup w/ a site like this.
m
@gsr Please kindly see my comment above. Look like you are still hitting the Instagram Basic Display API, which is deprecated. And according to the link which I posted in my last comment, any requests to the API WILL receive an error. Please use the new Instagram API instead.
g
i am checking that
it seems the way we selected the instagram api is wrong
i am checking this youtube link

https://www.youtube.com/watch?v=hpWT-8gkyd8

m
The information in that youTube video is outdated. That video is still telling you to use the Instagram Basic Display API. According to https://developers.facebook.com/docs/instagram-basic-display-api/ Starting December 4, 2024, all requests made to the API WILL receive an error message.
Given that they announced this deprecation on September 4, 2024, the youTube video that you are using was created prior to the announcement was made
g
oh
is there a new video which outlines it
m
Or you can follow the link in to go to the new Instagram API and read the documentation??
I don't know if there is a new video. You need to search for it.
g
i am doing so, but i am still confused, i am rereading that doc again and again to make sure i am not missing anything