question

snugeall avatar image
snugeall asked Miguel Deactivated edited

Renew Access Token Automatically

I am currently creating an integration between Clover and my desktop application. What I'm trying to accomplish is pull all sales from clover and push all items in our system to clover. Basically, I am gonna have a service somewhere that will run once a day to update both systems.

After reading the documentation it looks like I need to use OAuth, but in order to use this I need a redirect uri, and of course a desktop application doesn't have this. I am creating a web application that will act as a proxy between the two systems.

How do I renew the access token without user intervention? Once the user installs my app in clover and I get the first access token I don't want the user to do anything else.

What's the expiry of the access token? I looked through the forums and there are conflicting answers.

I appreciate any suggestions or help you can provide.
API Token
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

Miguel avatar image
Miguel Deactivated answered
Token expiration is roughly a year, but your app should not assume this in its logic. The app should intelligently handle an expired API token by obtaining a new token through the OAuth flow or requesting a new token via the Android SDK (for Android apps). It's not possible to renew a token without going through one of those flows.

In the case of a desktop app, you'll need a web component to handle the OAuth process for authentication.
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