Open johnhmacleod opened 6 years ago
Seems like a good idea to cache the token. Would need a mechanism to determine when the token does expire. Am happy to accept a pull request.
The mechanism would be to check the return code I believe.
Return code 401.
Love to, but likely well beyond my JS (& RED) skills to implement that!
It seems that this node requests a token every time it is invoked. Is that necessary? Can this be optimised? Maybe check for an expired token error code & regenerate or refresh when needed. Otherwise there are 2 API calls per invocation. I've been unable to find out how long tokens last!