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
Use the GET /refresh_access_token endpoint to refresh unexpired long-lived Instagram User Access tokens. Refreshing a long-lived token makes it valid for 60 days again. Long-lived tokens that have not been refreshed in 60 days will expire.
You can access the token generator in the App Dashboard > Products > Instagram Basic Display > Basic Display tab. 2. Scroll down to User Token Generator and click on Generate Token next to your account.
The Instagram Basic Display API allows users of your app to get basic profile information, photos, and videos in their Instagram accounts. The API can be used to access any type of Instagram account but only provides read-access to basic data.
Go to Dashboard and select Products->Instagram Basic Display->Basic Display. Next, scroll down, and you will see the field Generate Token. Click on the Generate Token field to retrieve Instagram access token WordPress. Once you click on the Generate Token field, log in with your Instagram credentials.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With