5

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.

Krishna
  • 6,107
  • 2
  • 40
  • 43
Bassel Turky
  • 371
  • 7
  • 15
  • The following answer worked for me: [https://stackoverflow.com/a/70072816/1594274](https://stackoverflow.com/a/70072816/1594274) – Adel Mourad Jan 14 '23 at 11:07

1 Answers1

7

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).

Krishna
  • 6,107
  • 2
  • 40
  • 43