Enterprise recaptcha REST API 返回 400 作为 http 返回码

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

我正在从我的后端对谷歌企业 API 进行 REST 调用。 我打电话给这个端点:

https://recaptchaenterprise.googleapis.com/v1/projects/" + PROJECT_ID + "/assessments?key=" +  APIKEY;

根据谷歌文档,这是我在请求中发送的请求主体:

String requestBody = "{\"event\":{\"token\":\"" + recaptchaResponse + "\",\"siteKey\":\"" + siteKey + "\",\"expectedAction\":\"PASSWORD_RESET\"}}";

问题是我一直收到 400 返回码,但我不明白是什么问题。 你有什么建议吗?

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