TiagoGrosso / instagram-graph-api-lib

An npm package that lets you easily perform requests to the Instagram Graph API
https://www.npmjs.com/package/instagram-graph-api
MIT License
71 stars 10 forks source link

About api url #462

Closed oscarcalvo closed 1 week ago

oscarcalvo commented 1 week ago

I’m a newbie with the Instagram API, and I’m not sure if this affects only me since my app is still in development mode. However, when working with this package, I always get errors like "Invalid OAuth access token - Cannot parse access token."

The issue was (I don't know why) with the API_URL in src/main/Constants.ts. It was set to https://graph.facebook.com, which didn’t work for me. Instead, I used https://graph.instagram.com, and it worked fine. Just sharing this to help in case someone else encounters the same error.

TiagoGrosso commented 1 week ago

Hi!

The URL depends on the type of token you are generating. I believe for you to be using that URL, you are creating a token with the Instagram Login which is a somewhat recent feature

I plan to add support for both. I created https://github.com/TiagoGrosso/instagram-graph-api-lib/issues/394#issue-2451830521 for that purpose