j___.___j
j___.___j

Reputation: 326

Google Bearer auth on http request via Node-RED

I want to use the AutoML API via Node-RED and I have the request URL, but I have to create a bearer token from the service account .json somehow regularly, because the token expires in 3.600 seconds. Any clue how I can achieve this or any other idea how to call the AutoML API in a different way?

Any help is very, very much appreciated!

Upvotes: 0

Views: 295

Answers (1)

hardillb
hardillb

Reputation: 59741

To do this you probably need 2 flows working together.

The first uses an inject node to every hour (3600 seconds) that gets a new auth token. This token is stored in a context variable.

You can then use this context variable to set the right headers on the http-request node to AutoML API

Upvotes: 1

Related Questions