authentication - Pinterest 中的身份验证代码端点是什么?

标签 authentication oauth pinterest

这个文档很清楚:http://developers.pinterest.com/api_docs/oauth_code_exchange/

我需要 code用访问 token 交换它。但是访问此代码的端点在哪里?试过“经典”:

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/

例子:
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"

但奇怪的是,您必须传入有效的访问 token 才能使端点工作,否则它将返回未经身份验证的错误。访问 token 可以来自任何人或任何 Pinterest 应用程序,不需要来自身份验证用户或身份验证应用程序,只要它没有过期。

目前获取有效访问 token 的最简单方法是在此处登录 Pinterest for iPhone 应用程序,您将在 URL 哈希中找到 token :

https://www.pinterest.com/oauth/?consumer_id=1431594&response_type=token

关于authentication - Pinterest 中的身份验证代码端点是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21624632/

相关文章:

facebook - 存储用户的 Facebook 访问 token

facebook - Open Graph 产品架构枚举属性值

django - 根据 Django 应用程序中的 Drupal 用户数据库表进行身份验证

ios - 您可以使用 API 获取您的 Twitter 电子邮件吗?

actionscript-3 - 使用 as3crypto 多次登录 assiSTLy.com

rest - 使用自己的 API 后端处理社交网络身份验证

pinterest - 如何从 Pinterest API 获取搜索提要

javascript - flex 元素是否有可能与它们上方的元素紧密对齐?

javascript - 带有 express-jwt 的 JSONWebTokens VS passport-jwt

asp.net - 使用 Visual Studio Web 服务器运行时的身份验证对话框