适用于应用程序的Instagram OAuth访问令牌到期 [英] Instagram OAuth Access Token expiration for app

查看:77
本文介绍了适用于应用程序的Instagram OAuth访问令牌到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用,该应用将使用用户访问令牌从主题标签供稿中提取图片,并且我想确保OAuth令牌不会过期.用户将定期访问该网站,但我不希望它依赖instagrams-可能有一天会决定令牌何时到期.

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?

推荐答案

access_token通常不会过期,除非有任何可疑的活动,否则instagram将撤消access_token,您会得到新的.

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.

如果用户更改密码,则access_token将不起作用,您必须重新输入密码.

If the user changes password then the access_token will not work, you have to get new ones.

我的应用程序已使用相同的access_token大约3年,没有到期.

My app has been working with same access_token for about 3 years, there is not expiration.

以这种方式实施,如果access_token失败,请要求用户重新授权.

So implement in such a way that if access_token fails, ask user to re-authorize.

这篇关于适用于应用程序的Instagram OAuth访问令牌到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆