---
updatedAt: 2026-11-02T21:38:15.000Z
agentTools:
  projectIndex: https://docs.clover.com/dev/llms.txt
---

# Authenticate with the v2/OAuth flow

<div class="container-top">
  
  <div class="container-reg">
    <div class="pill-reg">
      <div class="label-reg">North America</div>
    </div>
  </div>
  
   <div class="container-reg">
    <div class="pill-reg">
      <div class="label-reg">Europe</div>
    </div>
  </div>
  
  <div class="container-reg">
    <div class="pill-reg">
      <div class="label-reg">Latin America</div>
    </div>
  </div>
  
  <div class="container-reg">
    <div class="pill-reg">
      <div class="label-reg">Asia Pacific</div>
    </div>
  </div>
</div>

[block:html]
{
  "html": "<!--DS-6579: Updated topic on the same lines as the topic for Europe and LATAM. This resolves a gap in our docs. Also, added information approved by Dev Rel (Kevin Rosales) for the Ecommerce v2/OAuth flow: https://docs.clover.com/dev/docs/generate-oauth-expiring-access-and-refresh-token --> \n<!--DS-5402: Oct 14, 2024 - Updated this topic to contain only Concept-based information.\n Removed the Prerequisites and Steps for expiring tokens from here and moved to a standalone topic. -->\n<!--DS-7355-Updated region icon and other info to indicate that \nv2/OAuth flow is available in all regions.-->"
}
[/block]

All REST API endpoints require an OAuth-generated `access_token` with specific permissions. Use the v2/OAuth flow to create an expiring authentication token, which includes an `access_token` and a `refresh_token` pair.

***

# Why use OAuth?

OAuth is the industry-standard protocol for online authorization. Due to the sensitivity of merchant data, Clover has implemented the OAuth 2.0 security framework. When a merchant selects and installs your app from the Clover App Market, Clover uses OAuth to secure the communication between your app and the merchant and to grant your app the necessary access to merchant data. Your app may need to access data about Clover merchants, such as their order history or current inventory, using the [Clover REST API](https://docs.clover.com/dev/docs/making-rest-api-calls).

***

# Get started

[block:html]
{
  "html": "<style>\n    .wrapper {\n      width: 100%;\n      display: flex;\n      flex-wrap: wrap;\n      gap: 10px;\n    }\n    .box {\n      flex: 1 1 calc(50% - 10px);\n      min-height: 150px;\n      text-align: left;\n      margin-bottom: 4px;\n      overflow: hidden;\n      border: 1px solid #D8D8D8;\n      padding: 10pt;\n      box-sizing: border-box;\n      transition: box-shadow 0.3s ease;\n    }\n    .box:hover {\n      box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4);\n    }\n    h2.g {\n      font-size: 17px;\n      color: #228800;\n      margin: 2px 0 8px 0;\n    }\n    p.small-text {\n      font-size: 15px;\n      color: #5A5A5A;\n    }\n    .btn {\n      font-family: Altform, sans-serif;\n      border: none;\n      background-color: inherit;\n      font-size: 15px;\n      color: #228800;\n      text-align: left;\n      cursor: pointer;\n      display: block;\n      margin-bottom: 4px;\n    }\n    .btn:hover {\n      color: #5D5D5D;\n    }\n    .btn a {\n      text-decoration: none;\n      color: inherit;\n    }\n    .btn::before {\n      content: \"➔ \";\n      color: #228800;\n    }\n\n    /* Responsive styles */\n    @media (max-width: 1200px) {\n      .box {\n        flex: 1 1 calc(50% - 10px);\n      }\n    }\n    @media (max-width: 768px) {\n      .box {\n        flex: 1 1 calc(100% - 10px);\n      }\n    }\n    @media (max-width: 480px) {\n      .box {\n        flex: 1 1 100%; /* Full width on small screens */\n      }\n    } \n  \n  </style>\n  \n<body>\n  <div class=\"wrapper\">\n\n <div class=\"box\">\n  <h2 class=\"g\">Understand the v2/OAuth flow</h2>\n  <p class=\"small-text\">Use the following list of contents to understand the v2/OAuth flow to create expiring authentication tokens:</p>\n  <div class=\"btn-container\">\n    <button class=\"btn\"><a href=\"https://docs.clover.com/docs/oauth-intro\" target=\"_blank\">Clover v2/OAuth flow overview</a></button>\n    <button class=\"btn\"><a href=\"https://docs.clover.com/docs/high-trust-app-auth-flow\" target=\"_blank\">Auth code flow for high-trust apps</a></button>\n    <button class=\"btn\"><a href=\"https://docs.clover.com/docs/oauth-flow-for-low-trust-apps-pkce\" target=\"_blank\">Auth code flow for low-trust apps</a></button>\n    <button class=\"btn\"><a href=\"https://docs.clover.com/docs/merchant-dashboard-left-navigation-oauth-flow\" target=\"_blank\">Initiate OAuth flow from the Clover App Market</a></button>\n  </div>\n</div>\n\n<div class=\"box\">\n  <h2 class=\"g\">Generate expiring authentication tokens with the OAuth flow</h2>\n  <p class=\"small-text\">See the steps on how to generate the `access_token` and `refresh_token` pair. You also need to generate a new refresh token before the current token pair expires:</p>\n  <button class=\"btn\"><a href=\"https://docs.clover.com/dev/docs/generate-expiring-tokens-using-v2-oauth-flow\" target=\"_blank\">Generate OAuth expiring token</a></button>\n  <button class=\"btn\"><a href=\"https://docs.clover.com/dev/docs/refresh-access-tokens\" target=\"_blank\">Use refresh token to generate new expiring token</a></button>\n  <button class=\"btn\"><a href=\"https://docs.clover.com/dev/docs/legacy-token-migration-flow\" target=\"_blank\">Migrate legacy OAuth tokens to v2/OAuth tokens</a></button>\n</div>\n  </div>\n</body>\n</html>\n"
}
[/block]

# Sandbox and production environment URLs

Clover sandbox and production environments use different URLs. The following table lists which URL to use for OAuth requests in each environment.

[block:parameters]
{
  "data": {
    "h-0": "Request path",
    "h-1": "Sandbox URL",
    "h-2": "Production URL  \nNorth America",
    "h-3": "Production URL  \nEurope",
    "h-4": "Production URL  \nLatin America",
    "0-0": "/oauth/v2/authorize",
    "0-1": "sandbox.dev.clover.com",
    "0-2": "www\\.clover\\.com",
    "0-3": "www\\.eu\\.clover\\.com",
    "0-4": "www\\.la\\.clover\\.com",
    "1-0": "/oauth/v2/token",
    "1-1": "apisandbox.dev.clover.com",
    "1-2": "api.clover.com",
    "1-3": "api.eu.clover.com",
    "1-4": "api.la.clover.com",
    "2-0": "/oauth/v2/refresh",
    "2-1": "apisandbox.dev.clover.com",
    "2-2": "api.clover.com",
    "2-3": "api.eu.clover.com",
    "2-4": "api.la.clover.com",
    "3-0": "/oauth/token/migrate_v2",
    "3-1": "apisandbox.dev.clover.com",
    "3-2": "api.clover.com",
    "3-3": "api.eu.clover.com",
    "3-4": "api.la.clover.com"
  },
  "cols": 5,
  "rows": 4,
  "align": [
    "left",
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]

## Production URLs for Japan

The following table lists the production URLs for OAuth requests in Japan.

[block:parameters]
{
  "data": {
    "h-0": "Request path",
    "h-1": "Production URL  \nJapan",
    "0-0": "/oauth/v2/authorize",
    "0-1": "www\\.tc\\.clover\\.com",
    "1-0": "/oauth/v2/token",
    "1-1": "api.tc.clover.com",
    "2-0": "/oauth/v2/refresh",
    "2-1": "api.tc.clover.com",
    "3-0": "/oauth/v2/recovery",
    "3-1": "api.tc.clover.com",
    "4-0": "/oauth/token/migrate_v2",
    "4-1": "api.tc.clover.com"
  },
  "cols": 2,
  "rows": 5,
  "align": [
    "left",
    "left"
  ]
}
[/block]

***

# Watch video: Clover v2/OAuth expiring tokens

[block:html]
{
  "html": "<div class=\"vt\">\n   <table class=\"vt\">\n     <colgroup>\n      <col id=\"first\">\n      <col id=\"second\">\n      </colgroup>\n          <thead>\n            <tr class=\"table-head\">\n              <th class=\"table-head\">Watch</th>\n              <th class=\"table-head\">Learn</th>\n            </tr>\n          </thead>\n          <tbody>\n <!--1st body Row-->\n            <tr class=\"table-content\">\n <!--1st cell-->\n              <td class=\"table-content\">\n                <p class=\"table-content\" style=\"text-align:center;\"></p>\n      <div style=\"clear: both;padding: 2px;text-align:center;\">\n        <iframe id=\"myiframe100p\" \n        src=\"https://www.youtube.com/embed/UgVWhqdfY2c\" \n        title=\"Clover v2/OAuth flow: Expiring Tokens\" \n        frameborder=\"0\" \n        allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; \n               gyroscope; picture-in-picture; web-share\" \n        allowfullscreen>\n      </iframe>\n       </div>\n         </td>\n <!--2nd cell-->\n          <td class=\"table-content\">\n<p class=\"table-content\">In this video, learn:</p>\n    <ul class=\"table-content\">\n      <li>What are expiring tokens.</li>\n      <li>How to generate access and refresh tokens.</li>\n      <li>How to migrate an existing app to use expiring tokens.</li>\n      <li>How to start the OAuth flow from the Merchant Dashboard left navigation app link.</li>\n    </ul>\n <p class=\"table-content\">View or download:\n<a href=\"https://clover.box.com/s/27w4v0aq4j47qg8k8tg1cfba4ivuauri\" target=\"_blank\">\n  Clover expiring tokens slides</a></p>\n         </td>\n          </tr>\n <!--end 1st body Row-->\n</table> </div>\n\n<!--=========================================================-->\n<!--related styles are in Reusable HTML content block - Video-Embed-Table-Code - at the bottom of the page-->"
}
[/block]

***

# Related topics

* <a href="https://docs.clover.com/dev/docs/use-oauth" target="_blank">Authenticate with v2/OAuth flow</a>
* <a href="https://medium.com/clover-platform-blog/expiring-oauth-tokens-securing-clover-merchant-data-16243b9c00cc" target="_blank">Blog: Expiring OAuth Tokens: Securing Clover Merchant Data</a>
* <a href="https://medium.com/clover-platform-blog/understanding-clover-auth-tokens-and-ecommerce-keys-4e048827afa2" target="_blank">Blog: Fiddling Through Digital Keys: Clover Auth Tokens and Ecommerce Keys</a>

<HTMLBlock>{`
<style>
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Video Table (vt) */

div.vt {
  width: 100%;
  overflow: auto;
}

table.vt,
td.vt {
  border: 1px solid #000;
}

#first {
  width: 40%;
}

#second {
  width: 60%;
}

tr.table-head th.table-head {
  background-color: #280;
  margin-block-start: 1em;
  color: #fff;
  margin-top: 0;
  font-size: 1.4em;
  font-weight: 500;
  overflow-wrap: normal;
  word-break: normal;
}

td.table-head {
  margin-block-start: 1em;
  color: #fff;
  padding: 10px;
  margin-top: 0;
  font-size: 1.4em;
  font-weight: 500;
  overflow-wrap: normal;
  word-break: normal;
}

tr.table-content {
  vertical-align: top;
}

td.table-content {
  vertical-align: top !important;
  margin-block-start: 1em;
}

p.table-title {
  color: #fff;
  padding: 10px;
  margin-top: 0;
  font-size: 1.4em;
  font-weight: 500;
  overflow-wrap: normal;
  word-break: normal;
}

p.table-content {
  padding-left: 4%;
  padding-right: 4%;
  overflow-wrap: normal;
  vertical-align: top;
  margin-block-start: 1em;
}

ul.table-content {
  margin-block-start: 1em;
}

/* iframe sizes */

#myiframe100p {
  width: 100%;
  min-height: 315px;
}

#myiframe90p {
  width: 90%;
  height: 100%;
}

#myiframe75p {
  width: 75%;
  height: 75%;
}

#myiframe60p {
  width: 60%;
  height: 60%;
}

#myiframe50p {
  width: 50%;
  height: 50%;
}
</style>
`}</HTMLBlock>

<br />