Reputation: 511
I keep getting this error, I am trying to implement google reCaptcha v3, I gave myself all possible permissions on my service account but nothing seems to work. I don't even understand the error.
these are some lines of the error from the terminal.
Error: 7 PERMISSION_DENIED: Permission 'recaptchaenterprise.assessments.create' denied on resource '//cloudresourcemanager.googleapis.com/projects/my-project-auth-330511' (or it may not exist)
...\node_modules@grpc\grpc-js\build\src\call.js:31 return Object.assign(new Error(message), status);
statusDetails: [
ErrorInfo {
metadata: {
permission: 'recaptchaenterprise.assessments.create',
resource: 'projects/my-project-auth-330511'
},
reason: 'IAM_PERMISSION_DENIED',
domain: 'cloudresourcemanager.googleapis.com'
}
],
reason: 'IAM_PERMISSION_DENIED',
domain: 'cloudresourcemanager.googleapis.com',
I would like to know what causes this error.
Upvotes: 9
Views: 5816
Reputation: 2956
Or you can use an API key instead of service accounts as follows:
Then simply append the API key generated into your assessment POST request as follows:
https://recaptchaenterprise.googleapis.com/v1/projects/{{PROJECT_ID}}/assessments?key={{API_KEY}}
along with the JSON body as explained in Create assessments for mobile applications.
Upvotes: 0
Reputation: 91
You should create a service account at credentials page.
Then, give reCaptcha Enterprise Agent
role on creation (we did not manage to add roles to existing service-account).
Upvotes: 9