Use API tokens

United States
Latin America

Requests to the REST API require a merchant ID and an API token. The merchant ID is part of the URL (link) used to access the Clover merchant website.{mId}

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



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 REST APIs, set the Authorization header with a type of Bearer and the credential as your {API_Token}. The following cURL command is an example of how to use of the Authorization header. In this example, results are piped to a Python tool to pretty-print the JSON returned by the query.

$ curl -s{mId}/orders --header "Authorization: Bearer {API_Token}" | python -mjson.tool