Clover Platform Docs

Using API tokens

Requests to the REST API require a merchant ID and an API token. The merchant ID is part of the URL used to access the Clover merchant website.

https://apisandbox.dev.clover.com/home/m/{mId}

To retrieve the API token, you must use OAuth 2.0 in the production environment.

πŸ“˜

NOTE

Since the API token request consists of sensitive information about your app, this request does not have CORS support in the production environment.

To successfully request an API token, send this request from your app server to the Clover Server. When the Clover Server responds to the request, retrieve the API token from your app server.

Once you have retrieved your API token, you can test Clover's REST APIs from the command line. When you are making server-side requests to Clover's REST APIs, set the Authorization header with a type of Bearer and the credential as your {API_Token}. The following cURL command shows the use of the Authorization header.

πŸ“˜

NOTE

In the following examples, results are piped to a Python tool to pretty-print the JSON returned by the query.

$ curl -s https://apisandbox.dev.clover.com/v3/merchants/{mId}/orders --header "Authorization:Bearer {API_Token}" | python -mjson.tool

For testing purposes, we at Clover provide CORS support for such client-side requests. In your request, set your API token as the value of the access_token query parameter.

$ curl -s https://apisandbox.dev.clover.com/v3/merchants/{mId}/items?access_token={API_token} | python -mjson.tool

Updated 3 months ago


Using API tokens


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.