8
votes

From the looks of the Instagram Basic Display API docs, it looks like both the auth code and access token expire after 1 hour. Is there any way to renew the access token without requiring the user to log in every time?

Link to relevant docs: https://developers.facebook.com/docs/instagram-basic-display-api/overview

1
I'm sure this must be a typo on their side. A token that expires in 1 hour would be completely useless. - hermanschutte
You would think, right? But I'm getting this error from the API after an hour: "Error validating access token: Session has expired on Tuesday, 22-Oct-19 08:00:00 PDT. The current time is Tuesday, 22-Oct-19 08:22:03 PDT." - lem101
A bug has been filed: developers.facebook.com/support/bugs/3109002399171119. Although it seems this is per design and not a typo. - hermanschutte
Wow, like you mentioned in your comment on that thread, this makes the API pretty useless if we have to constantly re-authenticate users. Let's see how facebook responds to your comment - lem101
Please take a look at the question related this on the community discussion thread: developers.facebook.com/community/threads/2348548148794443 Hopefully with enough support this will be considered. - hermanschutte

1 Answers

1
votes

Support for Long-Lived Access Tokens has been added to the Basic Display API.

Here is the documentation: https://developers.facebook.com/docs/instagram-basic-display-api/guides/long-lived-access-tokens