Search code examples
google-cloud-platformocruipathrpa

Is there any way that I can get Google access tokens only using API?


I am building an RPA process to integrate with Google AI Document and one of the challenges I've encountered is getting the access token and using it during the API call. Most of the time I'm just using powershell by running gcloud auth application-default print-access-token script in order to get the token.

Is there any other way that I can do in order to get that token perhaps by authorizing through an API call or anything?


Solution

  • Use gcloud auth application-default print-access-token --log-http to view the API call that perform the GCLOUD sdk and get inspiration from them.

    The content that you will see is sensitive and the logs are deactivated by default. To view them perform a gcloud config set log_http_redact_token false to view unredacted logs.