2

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?

Mirai
  • 55
  • 3
  • Where will your RPA process be running? – Gari Singh Feb 18 '22 at 09:18
  • The RPA UiPath process will be run attendedly using local machine – Mirai Feb 18 '22 at 10:16
  • while using RPA/uipath (I'm not familiar with such tools) are you able to perform calls by using your service account credentials as described on [oauth2](https://developers.google.com/identity/protocols/oauth2/service-account#httprest). Could you provide links and documentation about the tools you are using. – Betjens Feb 18 '22 at 11:34
  • Hi Betjens, so far I haven't use the oauth2 method yet as I'm not familiar with it. Let me have a look on it. Thanks for the suggestion. Here is the tool I'm using called UiPath, seems like the oath2 option is there [Http Request](https://docs.uipath.com/activities/docs/http-client) – Mirai Feb 18 '22 at 12:34
  • 1
    Yes, It look like you should be able by using the UI. You will have to perform your requests as [Create a JSON Web Token](https://developers.google.com/identity/protocols/oauth2/images/flows/jwt.png) diagram shows. – Betjens Feb 18 '22 at 16:22

1 Answers1

5

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.

guillaume blaquiere
  • 66,369
  • 2
  • 47
  • 76