car*_*ics 6 api oauth-2.0 pinterest
我的问题是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
Run Code Online (Sandbox Code Playgroud)
并获取访问令牌:
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
Run Code Online (Sandbox Code Playgroud)
实际的回应是:
{
"access_token": "AfISUq75NELGEECEurmvEcIwlQZDFFBOnAdsa",
"token_type": "bearer",
"scope": [
"read_public",
"write_public",
"read_private",
"write_private",
"read_write_all"
]
}
Run Code Online (Sandbox Code Playgroud)
我在Pinterest文档中找不到有关令牌过期的任何内容,并且不会在响应中返回到期日期.
根据这个问题,Pinterest会返回过期的令牌
我可以看到这个人正在使用API v3端点:https: //api.pinterest.com/v3/oauth/code_exchange/
作为回应,他正在进入expires_at战场
在pinterest文档中我找不到关于API versinos V2或V3的任何信息,
所有文档Pinterest API都与API V1有关.
对此有何帮助?