该文档非常清楚: developers.pinterest/api_docs/oauth_code_exchange/
我需要code才能将其与访问令牌交换.但是访问此代码的端点在哪里?尝试了经典":
I need the code for swap it with an access token. But where is the endpoint for access to this code? Tried the "classic" :
api. pinterest/oauth2/auth?client_id=&redirect_uri=&scope=&response_type=code
但似乎是404.
推荐答案v3的终结点是:
PUT api.pinterest/v3/oauth/code_exchange/示例:
curl -X PUT api.pinterest/v3/oauth/code_exchange/ -d "access_token={access token}&consumer_id={client id}&consumer_secret={client secret}&redirect_uri={redirect uri}&code={code}&grant_type=authorization_code"但是奇怪的是,您必须传递有效的访问令牌才能使端点正常工作,否则它将返回未经身份验证的错误.该访问令牌可以来自任何人或任何Pinterest应用程序,并且只要其尚未过期,就不必来自身份验证用户或身份验证应用程序.
What is strange though, is that you have to pass in a valid access token for the endpoint to work or it will return an Unauthenticated error. The access token can be from anyone or any Pinterest app and does not need to be from the authenticating user or the authenticating app, as long as it has not expired.
到目前为止,获得有效访问令牌的最简单方法是在此处登录iPhone的Pinterest,您将在URL哈希中找到该令牌:
The easiest way to obtain a valid access token as of now is to log in to the Pinterest for iPhone app here and you will find the token in the URL hash:
www.pinterest/oauth/?consumer_id= 1431594& response_type =令牌
更多推荐
Pinterest中的身份验证代码终结点是什么?
发布评论