最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

oauth2 playground - Google Cloud Search third-party support initialization does not complete - Stack Overflow

programmeradmin1浏览0评论

I am setting up a Google Cloud Search project. I've gotten as far as step 5.3 in the guidance at for "Configure access to the Google Cloud Search REST API". I'm using the OAuth 2.0 Playground at to do this setup.

The OAuth 2.0 Playground appears to handle the construction of the POST request needed in step 5.3, but I haven't been able to get the request to be successful. My request looks like

POST /v1:initializeCustomer HTTP/1.1
Host: cloudsearch.googleapis
Content-length: 26
Content-type: application/json
Authorization: Bearer (access token redacted)
Accept: application/json

--data '{}'
--compressed

(the gap between the Accept: header line and the body (starting with --data) is intentional - it's displaying that way in OAuth Playground)

and produces

HTTP/1.1 400 Bad Request
Content-length: 171
X-xss-protection: 0
X-content-type-options: nosniff
Transfer-encoding: chunked
Vary: Origin, X-Origin, Referer
Server: ESF
-content-encoding: gzip
Cache-control: private
Date: Fri, 07 Feb 2025 13:03:56 GMT
X-frame-options: SAMEORIGIN
Alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-type: application/json; charset=UTF-8

{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "Invalid JSON payload received. Unable to parse number.\n--data '{}' \\n--comp\n^",
    "code": 400
  }
}

instead of the expected instance of operation shown in the guidance. I've tried variations on the request body, such as

--data '{}' --compressed with similar results. I've left the body empty, and received a 500 error. I've done some web searching for a solution, but the results have been geared toward PHP or application code vs. making a POST request via the OAuth Playground web interface.

发布评论

评论列表(0)

  1. 暂无评论