Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud video intelligence

hello, 

I'm not able to use this API, I've already given all possible permissions, enabled the services and it doesn't work, I always get this error: 7 PERMISSION_DENIED: The caller does not have permission"

Why does this happen?

0 1 127
1 REPLY 1

Hi @jpdss2020,

Welcome to Google Cloud Community!

The error message "7 PERMISSION_DENIED: The caller does not have permission" usually means that the Google Cloud service account your application is using lacks the necessary authorization to access the Cloud Video Intelligence API. With this, you can consider the following which might help you to eliminate this error:

Check your Service Account permissions: Verify that the service account you are using has the necessary roles assigned. You can check this in the Google Cloud Console. Go to IAM & Admin > IAM and find your service account that you’re using. Make sure it has the "Cloud Video Intelligence User" role or a similar role that grants access to the API.

Check your Authentication method. Common methods include:

  • Application Default Credentials: If you are using this approach, ensure the environment is configured correctly (e.g., GOOGLE_APPLICATION_CREDENTIALS environment variable set to the path of your service account key file). You may check this documentation for more information about ADC.
  • Explicit Service Account Key: If you're using a service account key file, make sure the JSON key file is correctly loaded and its credentials are being used in your code.

Resource Limits:Verify if you have reached any Google Cloud resource limits such as quota limits on the Video Intelligence API. Exceeding these limits might indirectly cause issues.

I hope the above information is helpful.