question

dja avatar image
dja asked rachel Deactivated commented

Authentication Token's lifespan

Hello, I'd like to know if there's any information regarding Authentication token's lifespan.

I currently have a clover app that connects to a webserver where we store the Authentication Token generated by the app, everything works all well and good until for some reason the token expires at seemingly random times, when this happens I'd like to send a new authentication token to my webserver, but I've got no way of knowing when this happens until a request fails, if this could be avoided it would be great.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

rachel avatar image
rachel Deactivated answered rachel Deactivated commented

Hi @DJA,

The current policy is to expire access tokens after a year. I'm not sure why a token would expire randomly. Do you respond to failed requests with exponential back-off before requesting a new token; it's possible that the problem is not the token per se.

Thanks,

Rachel

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dja avatar image dja commented ·

Not a year has passed since we started working with Clover and various tokens have expired since, a lot of them actually, sometimes on the same day. When we get an "Unauthorized" answer we just ask for a new token and it works, we might have tried once or twice with the same token the first couple of times this happened until we realised we just had to ask for a new one to make it work.

0 Likes 0 ·
rachel avatar image rachel commented ·

Hmm, it's possible that the merchant is uninstalling the app, which invalidates their stored token, and then re-installs the app.

0 Likes 0 ·

Welcome to the
Clover Developer Community