Pinterest API 访问令牌过期
Pinterest API Access token expire
我的问题是 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.
对此有任何帮助吗?
Pinterest 访问令牌似乎没有到期日期,至少在 API 的当前版本中是这样。来自 documentation:
Exchange for an access token. Your app will call the API to exchange the authorization code for an access token, which is a permanent credential (unless the user revokes your access). You'll use the access token to perform actions on Pinterest on your user's behalf.
我碰巧知道 Stack Overflow OAuth 令牌也没有到期日,如果您想知道是否有其他主要网站使用此工作流程。
我的问题是 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.
对此有任何帮助吗?
Pinterest 访问令牌似乎没有到期日期,至少在 API 的当前版本中是这样。来自 documentation:
Exchange for an access token. Your app will call the API to exchange the authorization code for an access token, which is a permanent credential (unless the user revokes your access). You'll use the access token to perform actions on Pinterest on your user's behalf.
我碰巧知道 Stack Overflow OAuth 令牌也没有到期日,如果您想知道是否有其他主要网站使用此工作流程。