我的问题是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版本V2或V3的内容,
所有他们的文档 Pinterest API 都是关于API V1的。
有关此事的任何帮助?