Pinterest中的身份验证代码终结点是什么?

编程入门 行业动态 更新时间:2024-10-20 05:45:03
本文介绍了Pinterest中的身份验证代码终结点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

该文档非常清楚: 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中的身份验证代码终结点是什么?

本文发布于:2023-11-14 10:01:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586911.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:身份验证   代码   Pinterest

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!