question

dmitry-1 avatar image
dmitry-1 asked brokenoval answered

AuthToken lifetime

Hi! I have an android app, that works on clover devices. I call CloverAuth.authenticate(context, account, false) to obtain authToken. I use this token to get extra information from clover API (https://www.clover.com/api_docs/)

Not long time ago retrieved authTokens worked well. I cloud use clover API with authTokens that were generated 3 and more days ago. But not now. I've got an authToken and tried to use clover API with it (after ~5 hours after generating), but it was expired. I guess it was expired, cause the response is "Unauthorised". Also, authTokens that were obtained earlier the same way don't work now too.

Could you please make it clear? What authToken lifetime logic is? Thanks

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

brokenoval avatar image
brokenoval answered

I believe there is an issue that the clover team are working on at the moment. It looks like it has to do with token caching i.e. when you uninstall an app from your merchant, it disables the token. When reinstalling, the bug currently uses the cached token (now expired) rendering the token useless - here's a potential work around for the moment - https://devask.clover.com/question/65...

10 |2000

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

Welcome to the
Clover Developer Community