Skip to content

Curl to url with google auth

Why

Some services like Cloud Functions and Cloud Run expose a URL that you need authentication to make a reques to

How

Requires you to have the below installed

  • curl
  • gcloud cli
curl -H \
"Authorization: Bearer $(gcloud auth print-identity-token)" \
https://<url>>

Want to make this site better? Open a PR or help fund hosting costs