授权错误。"我们这边出了点问题。很抱歉"

问题描述 投票:1回答:1

在浏览器中使用这段代码来获取访问代码...

https://api.pinterest.com/oauth/?response_type=code&redirect_uri=https://example.com/redirect.htm&client_id=appid&scope=read_public,write_public&state=768uyFys

我得到了一个对话框,当我按下 "确定 "后,我得到了这个错误。

{"status": "failure", "code": 12, "data": "path: /oauth/\nparams:<dict_itemiterator object at 0x7f9735706710>\nAuthError(code=500, message='dial tcp 127.0.0.1:22000: connect: connection refused')", "message": "Something went wrong on our end. Sorry about that.", "endpoint_name": "oauth_connect"}
pinterest
1个回答
0
投票

我也遇到过这样的问题。你可以在google浏览器上粘贴URL,然后复制redirect_url,并在Pinterest应用中添加相同的内容。Pinterest会在打完API后调用重定向URL。你可以在你的应用程序中添加日志,在重定向URL被击中的地方验证响应。

https://api.pinterest.com/oauth/?state=9750187663&scope=read_public&client_id=abc&redirect_uri=https://9fa6caa3.ngrok.io/laravel/public/pinToken&response_type=code

你将得到结果array ( 'state' => '9750187663', 'code' => '15a1bcfb012abc1',)

© www.soinside.com 2019 - 2024. All rights reserved.