是什么在Pinterest的在auth code终点? [英] What's the auth code endpoint in Pinterest?

查看:195
本文介绍了是什么在Pinterest的在auth code终点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本文档是明确的:<一href=\"http://developers.pinterest.com/api_docs/oauth_$c$c_exchange/\">http://developers.pinterest.com/api_docs/oauth_$c$c_exchange/

我需要的 code 与访问令牌掉它。但如果是用于上网本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" :

<一个href=\"https://api.pinterest.com/oauth2/auth?client_id=&redirect_uri=&scope=&response_type=$c$c\">https://api.pinterest.com/oauth2/auth?client_id=&redirect_uri=&scope=&response_type=$c$c

但似乎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"

什么是奇怪,虽然,是你有一个有效的访问令牌传递端点工作或将返回未经身份验证的错误。访问令牌可以是任何人或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.

要获得有效的访问令牌截至目前最简单的方法就是在这里登录Pinterest的为iPhone应用程序,你会发现在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:

<一个href=\"https://www.pinterest.com/oauth/?consumer_id=1431594&response_type=token\">https://www.pinterest.com/oauth/?consumer_id=1431594&response_type=token

这篇关于是什么在Pinterest的在auth code终点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆