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

Cloud function gen 2 https trigger through google drive event api

Hi, i have created a cloud function https trigger which gets triggered by google drive changes push notification sent by google drive api. 

whenever i create unauthenticated cloud function that time google drive push notification was able to hit that trigger but when i created cloud iam authenticated cloud function it started giving 403 error

i know that we have to give cloud run invoker but i don't know to which service account i should give.

the default compute engine service account? even after binding invoker policy to this service account i was getting same error. 

can anyone help me what should be done such that drive push notification can hit that https trigger

1 2 638
2 REPLIES 2

Hi @Dipakkawale,

Welcome to Google Cloud Community!

  • Drive push notifications trigger 403 errors when your Cloud Function needs authentication but lacks proper permissions.
  • Identify the service account sending notifications through Google Drive API documentation.
  • Grant "Cloud Run Invoker" role to that service account in IAM settings.
  • Configure Cloud Function authentication (IAM or unauthenticated) and permissions.
  • Verify network settings, quotas, and potential alternative approaches.
  • Check function logs and Cloud error reporting for further troubleshooting.

This didn't work for me as the notification that google drive sends doesn't contain the bearer header. Is there anything I can do?

Top Solution Authors