Skip to Content
0
Jul 17, 2020 at 07:20 AM

Occasional expired token when using token caching in the REST receiver

74 Views

Hi!

I am occasionally getting the error response INVALID_OR_EXPIRED_TOKEN from an external service when I am using the token caching option in the REST receiver.

The traffic to and from the API is going as expected except for a few times per day when I get a couple of errors during a period of maybe 1 second.

It seems like I don't get any errors when I don't use the token caching option which leads me to suspect that the token expires during the time it takes to reach the API if it is sent from PI right before the expiration time. Is there maybe any way to neatly change the "expires_in" value in the respnse from the token request? Or perhaps you have any other thoughts on what could be the problem/solution?

I am thankful for all suggestions.

Best regards.