hungdev/react-native-instagram-login

Instagram Token expired soon how to generate new token without credentials

patelronakp opened this issue · 1 comments

I have implemented this package and its working fine but had facing one issue like i have only token which is expired after few minutes of inactivity with instagram. So in that case how could i get new token without again asking for the credentials. Do we have something like refresh token from the API so i can get new token based on that.

Please suggest how to takkle this situation or any other alternative solution are also welcome.

Sorry for late reply, Im so busy and I don't have much time to investigate this problem.
according to the docs, Authorization Codes can be exchanged for short-lived Instagram User Access Tokens. And i exchanged it for a long token by step 2, exchange code to token.
You can see:
https://developers.facebook.com/docs/instagram-basic-display-api/reference/oauth-access-token
https://developers.facebook.com/docs/instagram-basic-display-api/overview#short-lived-access-tokens
feel free to comment here.