1

I'm using AutoML Natural Language API, with my custom trained model to predict results.

In order, to use this service, I generate a Authorization token through Cloud Shell, that enables api requests.

So, I configured/created the service account and add "automl.editor" rule to service account, and:

-> export GOOGLE_APPLICATION_CREDENTIALS=/home/[project id]/[json key file]

->gcloud auth application-default print-access-token

It returns a valid token that works for 1 hour.

Is there any way to get a valid token for longer time? (or do I have to generate other?)

https://automl.googleapis.com/[version]/projects/[project id]/locations/[local id]/models/[MODEL ID]:predict

How can I increase the validity or auto refresh the token. I'm already using a service account

  • Does this answer your question? [AutoML Natural Language Token](https://stackoverflow.com/questions/53435943/automl-natural-language-token) – Hyperion Mar 08 '21 at 15:22

0 Answers0