Skip to main content

Hi,

I'm trying to create assessment in my app by salesforce, it returns an error like "{ "error": { "code": 403, "message": "Requests from this referrer are blocked.", "status": "PERMISSION_DENIED" } }" from backend.

Hi Prasanna23,


Josh from the reCAPTCHA team here. Apologies for the slow reply! Are you still having this issue? This error does not look like one from the reCAPTCHA endpoint, so I suspect it may be coming from the Salesforce integration itself. 


I am getting: { "error": { "code": 403, "message": "Requests to this API method are blocked.", "status": "PERMISSION_DENIED" } }
Before that error I got 400 with this response.
{ "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \\"event[token]\\": Cannot bind query parameter. Field 'event[token]' could not be found in request message.\\nInvalid JSON payload received. Unknown name \\"event[siteKey]\\": Cannot bind query parameter. Field 'event[siteKey]' could not be found in request message.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "description": "Invalid JSON payload received. Unknown name \\"event[token]\\": Cannot bind query parameter. Field 'event[token]' could not be found in request message." }, { "description": "Invalid JSON payload received. Unknown name \\"event[siteKey]\\": Cannot bind query parameter. Field 'event[siteKey]' could not be found in request message." } ] } ] } }


In both requests I had valid json values (redacted):

{ "event": { "token": "TOKEN_STRING", "siteKey": "MY_SITE_KEY" } }


I am getting: { "error": { "code": 403, "message": "Requests to this API method are blocked.", "status": "PERMISSION_DENIED" } }
Before that error I got 400 with this response.
{ "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \\"event[token]\\": Cannot bind query parameter. Field 'event[token]' could not be found in request message.\\nInvalid JSON payload received. Unknown name \\"event[siteKey]\\": Cannot bind query parameter. Field 'event[siteKey]' could not be found in request message.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "description": "Invalid JSON payload received. Unknown name \\"event[token]\\": Cannot bind query parameter. Field 'event[token]' could not be found in request message." }, { "description": "Invalid JSON payload received. Unknown name \\"event[siteKey]\\": Cannot bind query parameter. Field 'event[siteKey]' could not be found in request message." } ] } ] } }


In both requests I had valid json values (redacted):

{ "event": { "token": "TOKEN_STRING", "siteKey": "MY_SITE_KEY" } }


Hi azaric,


What type of API method are you using to push this? This says "requests to this API method are blocked" so I'm suspecting you might not be using the supported POST method to make this call:
https://cloud.google.com/recaptcha/docs/reference/rest/v1/projects.assessments/create


Reply