mar*_*zzz 6 authentication oauth pinterest
此文档很明确:http://developers.pinterest.com/api_docs/oauth_code_exchange/
我需要将code其与访问令牌交换.但是访问此代码的端点在哪里?试过"经典":
https://api.pinterest.com/oauth2/auth?client_id=&redirect_uri=&scope=&response_type=code
但似乎是404.
v3的端点是:
PUT https://api.pinterest.com/v3/oauth/code_exchange/
Run Code Online (Sandbox Code Playgroud)
例:
curl -X PUT https://api.pinterest.com/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"
Run Code Online (Sandbox Code Playgroud)
但奇怪的是,您必须传入有效的访问令牌才能使端点工作,否则它将返回Unauthenticated错误.访问令牌可以来自任何人或任何Pinterest应用程序,并且不需要来自身份验证用户或身份验证应用程序,只要它尚未过期即可.
到目前为止,获取有效访问令牌的最简单方法是在此处登录Pinterest for iPhone应用程序,您将在URL哈希中找到令牌:
https://www.pinterest.com/oauth/?consumer_id=1431594&response_type=token
| 归档时间: |
|
| 查看次数: |
3928 次 |
| 最近记录: |