Reuse of bearer token in node / process

Hey guys,

I already built a couple of nodes by myself. We are connecting to REST APIs built with the Symfony API Plattform. The authentication with getting the Bearer Token takes about 500ms, whereas the actual GET of the data takes only a few milliseconds.

When I checked some of the core nodes, I found out that every node makes a new authentication for each item. So when there are 10 items, 10 auths are done. In my case, this takes about 5 seconds.

Is there any technique or schema how to reuse the Bearer Token for a custom node or even use the same token for the whole process? Or are there any arguments, why not to do this (e.g. long running processes)?

Thanks in advance

Hi @BenW

I usually do the call for the token before looping the items. So it should only do the token auth one time.
This can of course only be done if the lifetime of the token and the requests allow this.

1 Like