question

Mikhail avatar image
Mikhail asked zgreathouse Deactivated commented

How to get API Token for Clover Native App?

Hi there, is it possible to somehow get an API Token when a Merchant installs our app without asking the Merchant to login in our landing page? Our native Clover App authorizes in our back-end by device serial, and we need to get the device serial via API to configure our back-end. And to access the API we need the Token.

OAuth
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 zgreathouse Deactivated commented
Yes, you are able to get an API token as a native android app. You can find sample code of how to do this here: https://github.com/clover/clover-android-sdk/blob/master/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/WebServiceActivity.java#L111-L115
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.

Mikhail avatar image Mikhail commented ·

Thank you! We'll try this. Does the token have lifetime limitation?

0 Likes 0 ·
zgreathouse avatar image zgreathouse Mikhail commented ·

The API tokens last a year, or until you uninstall the App. If you uninstall then reinstall the App you will have to get a new API Token.

0 Likes 0 ·

Welcome to the
Clover Developer Community