无法向 OAuth 端点发出 POST 请求



我尝试执行此请求,但出现错误:

1. { "error": "invalid_client", "error_description": "The OAuth client was not found." }

在我再次请求它之后:

2. 405. That’s an error.
The request method omPOST is inappropriate for the URL /oauth2/v4/token. That’s all we know.

详:

POST /oauth2/v4/token HTTP/1.1
Host: www.googleapis.com
Content-length: 208
content-type: application/x-www-form-urlencoded
user-agent: google-oauth-playground
client_secret=MYSECRET&grant_type=refresh_token&refresh_token=MYTOKEN&client_id=MYCLIENTID

编辑: 我正在将请求发送到无效的端点,使我无法接收预期数据。我能够按照谷歌文档中的步骤修复它:https://developers.google.com/identity/protocols/OAuth2WebServer

该错误表示您的客户端 ID 错误。请确保它是来自 Google API 控制台 (console.developers.google.com( 的客户端 ID,并且与客户端密钥匹配。刷新令牌也应颁发给原始客户端 ID。

最新更新