Instagram OAuth Access Token expiration for app

跟風遠走 提交于 2019-12-11 07:16:56

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/26791554/instagram-oauth-access-token-expiration-for-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!