【发布时间】:2016-09-17 22:17:58
【问题描述】:
我的问题是 Pinterest 访问令牌会过期吗?
我正在按照 Pinterest 官方文档获取访问令牌:
获取授权码:
https://developers.pinterest.com/docs/api/overview/#getting-your-authorization-code
https://api.pinterest.com/oauth/?
response_type=code&
redirect_uri=https://mywebsite.com/connect/pinterest/&
client_id=12345&
scope=read_public,write_public&
state=768uyFys
以及获取访问令牌:
https://developers.pinterest.com/docs/api/overview/#getting-your-access-token
https://api.pinterest.com/v1/oauth/token?
grant_type=authorization_code&
client_id=12345&
client_secret=6789abcd&
code=xyz1010
实际的反应是:
{
"access_token": "AfISUq75NELGEECEurmvEcIwlQZDFFBOnAdsa",
"token_type": "bearer",
"scope": [
"read_public",
"write_public",
"read_private",
"write_private",
"read_write_all"
]
}
我在 Pinterest 文档中找不到关于令牌过期的任何内容,并且没有返回过期日期作为响应。
根据这个问题Pinterest returns expired token
我可以看到这个人正在使用 API v3 端点: https://api.pinterest.com/v3/oauth/code_exchange/
作为回应,他得到了expires_at 字段
在 pinterest 文档中我找不到关于 API versinos V2 或 V3 的任何信息,
他们所有的文档Pinterest API 都是关于 API V1 的。
对此有什么帮助吗?
【问题讨论】: