Reputation: 363
I am creating an app that will be using a users access token to pull images from a hashtag feed and I want to be sure that the OAuth token will not expire. The user will be visiting the site regularly, but i don't want it to rely on instagrams maybe-could be someday attitude on when the tokens will expire.
I also don't want to use the app level token because i only get a limited amount of calls per hour and that will shrink quickly as more users are added.
Is there a way to refresh tokens or convert them into longer lasting tokens? Or at least have an expiration date so I know when to tell users to come back and re-auth?
Upvotes: 1
Views: 5546
Reputation: 12952
The access_token
will usually not expire, unless there was any suspicious activity, then instagram will revoke the access_token
and you have get new ones.
If the user changes password then the access_token
will not work, you have to get new ones.
My app has been working with same access_token
for about 3 years, there is not expiration.
So implement in such a way that if access_token
fails, ask user to re-authorize.
Upvotes: 6