sidhu
sidhu

Reputation: 11

Meta API for getting the long-lived token showing Sorry, this content isn't available right now

I have called the Instagram Meta API for getting the long-lived token. It generates a response like

Sorry, this content isn't available right now

https://graph.instagram.com/access_token?grant_type=ig_exchange_token&client_secret={instagram-app-secret}&access_token={short-lived-access-token}

This is the API which I used for getting the long-lived token.

FYI - I'm using the test app.

I have tried calling the meta API for getting the long-lived token but I couldn't get it.

Upvotes: 0

Views: 730

Answers (1)

I faced the same problem recently when I was trying to use the Instagram Graph API. I could exchange a valid short-lived token by a long-lived one using the following endpoint (documentation reference)

curl -i -X GET "https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=${app_id}&client_secret=${app_secret}&fb_exchange_token=${short_lived_access_token}"

With the corresponding environment variables app_id, app_secret, and short_lived_access_token defined previousuly.

I hope it helps

Upvotes: 0

Related Questions