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

Video Intelligence API: Live Streaming Video Annotation Results

I am trying to Stream Annotation to Storage using the sample code here - https://cloud.google.com/video-intelligence/docs/streaming/streaming-to-storage#video-stream-to-stor...

When I run the script with the proper permissions, I am receiving the following error: "google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission"

I am able to run this script - https://github.com/ZackAkil/video-intelligence-api-visualiser/blob/main/run_video_intelligence.py, that does not use the beta version without any issues.

Is this an issue with using "videointelligence_v1p3beta1" in the import statement?

0 3 510
3 REPLIES 3

Hi @Trobor,

Welcome to Google Cloud Community!

The error message "google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission" usually means that the credentials you're using to run your script lack the necessary permissions to access the Google Cloud resources you're attempting to use.  With regard to this, you can consider the following, which might help you answer your current scenario:

Check the Service Account Permissions: Ensure 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 for the script. Make sure it has the "Cloud Video Intelligence Beta User" role or a similar role that grants access to the beta API.

Enable the Required APIs: Make sure that the APIs your script is trying to access are enabled in your Google Cloud project. Go to APIs & Services > Library in the Google Cloud Console and check if the necessary APIs are enabled. Search for "Video Intelligence API" and ensure that the videointelligence_v1p3beta1 API is enabled.

Review Permissions: Some resources require more specific permissions. For example, accessing a specific bucket in Cloud Storage may require storage.objects.get permission. Also, the Google Cloud Storage bucket may not have the correct permissions. Confirm if the service account performing the operation has the necessary storage roles and if the Storage bucket has the necessary read IAM permissions.

Check the Project Quota: Ensure that your project has not exceeded its quota for the resource you are trying to access.

Review API Documentation: Check the documentation for the beta API for any specific requirements or additional permissions needed.

I hope the above information is helpful.

Hi @ibaui,

I've done everything except the Service Account Permissions you mentioned. I do not have the role "Cloud Video Intelligence Beta User" available under my IAM. Is there a process to get that role made available for a Project?

I am facing the same problem. May I know if this issue has a resolution? Does it require enterprise account?