> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sanity OAuth 2.0 connector profile – StackOne setup guide

> Set up the OAuth 2.0 connector profile for Sanity in StackOne. One-time admin setup required before your users can link Sanity accounts via Hub.

<Warning>Sanity provisions OAuth client credentials manually and does not support refresh tokens. Choose a long access-token validity when requesting credentials, since StackOne cannot silently renew an expired token — the user must re-authorize.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Request OAuth client credentials from Sanity</h2>

  <p>Sanity does not offer self-service OAuth app registration. You must contact Sanity to have your application credentials (Client ID and Client Secret) provisioned manually.</p>

  <Steps>
    <Step title="Contact Sanity to set up your OAuth application">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Reach out to your Sanity customer representative or via <a href="https://www.sanity.io/contact/sales" target="_blank" rel="noopener noreferrer">sanity.io/contact/sales</a>. Provide the details Sanity needs to register your app.</p>

        <ul>
          <li><strong>Application name</strong> and a short <strong>description</strong> (shown on the authorization page)</li>
          <li><strong>Application image</strong> URL (shown on the authorization page)</li>
          <li><strong>Callback URL:</strong> `https://api.stackone.com/connect/oauth2/sanity/callback`</li>
          <li><strong>Access token validity duration</strong> — request a non-expiring (or the longest possible) token validity for your OAuth app. Sanity does not issue refresh tokens, so an expired token cannot be renewed automatically and the connection must be re-authorized.</li>
          <li><strong>Important:</strong> explicitly ask Sanity to set your OAuth app's access tokens to <strong>never expire</strong> (no expiry). Because there are no refresh tokens, a non-expiring token is what keeps the connection working without periodic re-authorization.</li>
        </ul>
      </div>
    </Step>

    <Step title="Receive your Client ID and Client Secret">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sanity will return your application's credentials.</p>

        <ul>
          <li>Store the <strong>Client ID</strong> and <strong>Client Secret</strong> securely for use when creating the Connector Profile in StackOne</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

## Creating the StackOne Connector Profile

To create the Connector Profile in StackOne for <strong>Sanity</strong>:

<Steps>
  <Step title="Navigate to Connector Profiles">
    Login to StackOne and navigate to [Connector Profiles](https://app.stackone.com/connector_profiles)
  </Step>

  <Step title="Create New Connector Profile">
    <ul>
      <li>Click <strong>+ Connector Profile</strong></li>
      <li>Search for and select <strong>Sanity</strong></li>
      <li>Select <strong>Type</strong> as <strong>OAuth 2.0</strong></li>

      <li>
        Fill out the fields using details retrieved from your provider:

        <ul style={{ marginLeft: '20px' }}>
          <li><strong>Client ID</strong></li>
          <li><strong>Client Secret</strong></li>
        </ul>
      </li>

      <li>(Optional) Select <strong>Actions</strong> to be enabled for this Connector Profile</li>
      <li>Click <strong>Create profile</strong></li>
    </ul>
  </Step>
</Steps>

Congratulations! The new Connector Profile will now show up in your project ready to be used. You can now continue to <a href="/guides/accounts-section#linking-accounts">Link Accounts</a> for <strong>Sanity</strong>.
