> ## 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.

# Connect ServiceNow with API Key – StackOne Hub

> Link a ServiceNow account in the StackOne Hub using API Key. End-user guide to authorize the integration and start using ServiceNow actions.

<Warning>API Key authentication requires the token-based authentication plugin (com.glide.tokenbased\_auth), available from the Washington D.C. release onwards. You need admin privileges to generate API keys and manage API Access Policies.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Before you begin</h2>

  <p>Make sure you have access to a ServiceNow instance before starting.</p>

  <Steps>
    <Step title="Check prerequisites">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>You need an existing ServiceNow instance and an account with sufficient permissions.</p>

        <ul>
          <li>An active ServiceNow instance. If you do not have one, request a free Personal Developer Instance from the <a href="https://developer.servicenow.com/" target="_blank" rel="noopener noreferrer">ServiceNow Developer Program</a> or contact your ServiceNow administrator for access.</li>
          <li>An account with the admin role (or roles that can manage <strong>REST API Key</strong> records and <strong>REST API Access Policies</strong>).</li>
          <li>The token-based authentication plugin (com.glide.tokenbased\_auth) must be installed. If the <strong>REST API Key</strong> module does not appear in the next section, contact your ServiceNow administrator to install it.</li>
          <li>Your instance URL, in the format `https://{your-instance}.service-now.com` (for example, `https://dev12345.service-now.com`).</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Generate an API Key</h2>

  <p>Create a REST API Key in ServiceNow. The generated Token is the value you will paste into StackOne Hub.</p>

  <Steps>
    <Step title="Sign in to your ServiceNow instance">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Open your instance URL and log in.</p>

        <ul>
          <li>Go to `https://{your-instance}.service-now.com`</li>
          <li>Enter your <strong>User name</strong> and <strong>Password</strong>, then click <strong>Log in</strong></li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-sign-in.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=93766d3c37bc8953c1b3f3a84e6ebbe5" alt="ServiceNow login page with the Log in button highlighted" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-sign-in.png" />
      </div>
    </Step>

    <Step title="Open REST API Key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>All</strong> in the top navigation bar, then type `rest api key` in the <strong>Filter</strong> box. Click <strong>REST API Key</strong> under <strong>System Web Services</strong>. If this module does not appear, the token-based authentication plugin is not active on your instance.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-all-menu-rest-api-key.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=c1b480c848a9d89fec8d5434af5a196d" alt="All menu filtered to show the REST API Key module" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-all-menu-rest-api-key.png" />
      </div>
    </Step>

    <Step title="Create a new API key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the <strong>API Keys</strong> list, click <strong>New</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-api-keys-new.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=038132f00093dcc1a4373aba5ff11126" alt="API Keys list with the New button highlighted" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-api-keys-new.png" />
      </div>
    </Step>

    <Step title="Fill in the REST API Key form">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Complete the form fields, then click <strong>Submit</strong>. ServiceNow generates the <strong>Token</strong> automatically on save.</p>

        <ul>
          <li><strong>Name</strong>: enter a descriptive name (for example, `StackOne Integration`)</li>
          <li><strong>User</strong>: required — select the user the key acts as; this user needs roles that grant Table API access (such as admin or itil)</li>
          <li><strong>Active</strong>: leave checked</li>
          <li><strong>Description</strong>: optional</li>
          <li><strong>Auth Scope</strong>: leave empty unless you need to restrict the key to specific scopes</li>
          <li><strong>Expiry</strong>: leave empty for no expiration, or set a future date</li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-new-api-key-form.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=6f711ccfb9634c7b8baba375ae985230" alt="New REST API Key form with the User field highlighted" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-new-api-key-form.png" />
      </div>
    </Step>

    <Step title="Copy the generated Token">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>From the <strong>API Keys</strong> list, reopen the record you just created. The <strong>Token</strong> field contains the generated key, displayed masked. Click the lock icon next to the <strong>Token</strong> field to reveal the value, then copy it and store it securely — this is the value you will paste into the <strong>API Key</strong> field in StackOne Hub.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-api-key-token.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=bd33e05a9ffc21e657f928e98b55b8b0" alt="Saved REST API Key record with the masked Token field highlighted" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-api-key-token.png" />
      </div>
    </Step>

    <Step title="Verify user permissions">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>All</strong> in the top navigation bar, type `users` in the <strong>Filter</strong> box, then click <strong>Users</strong> under <strong>User Administration</strong>. Open the user you selected for the API key and confirm it has the roles required for Table API access (such as admin, itil, or rest\_service). Add missing roles if necessary.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-all-menu-users.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=7a62533dae731f801b7bbf4357cfd018" alt="All menu filtered to show Users under User Administration" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-all-menu-users.png" />
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Allow API Key Auth on the Table API</h2>

  <p>The Table API access policy must explicitly accept API Key authentication. Without this, every request returns HTTP 401 even with a valid key.</p>

  <Steps>
    <Step title="Open REST API Access Policies">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>All</strong> in the top navigation bar, type `rest api access` in the <strong>Filter</strong> box, then click <strong>REST API Access Policies</strong> under <strong>System Web Services</strong> > <strong>API Access Policies</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-all-menu-rest-api-access.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=20c0e33060d798c38ba0ebab78f4c951" alt="All menu filtered to show the REST API Access Policies module" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-all-menu-rest-api-access.png" />
      </div>
    </Step>

    <Step title="Identify the Table API policy">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the <strong>API Access Policies</strong> list, look for the policy where <strong>REST API</strong> = <strong>Table API</strong> and <strong>REST API PATH</strong> = `now/table`. Policy names vary by release and instance — depending on your ServiceNow release and instance configuration, this may be a single Table API policy or separate `Table GET API Access Policy` and `Table POST API Access Policy` records. If your instance has a single Table API policy, apply the next step to that one policy; if it has separate GET and POST policies, repeat the next step on each. If no Table API policy exists at all, skip ahead to the step for creating a new policy.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-policy-list-table-api.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=93a1b1953faab8460214b112133520ff" alt="API Access Policies list with the Table API policy row highlighted" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-policy-list-table-api.png" />
      </div>
    </Step>

    <Step title="Attach the Rest api key policy profile">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Open the Table API policy record, scroll to the <strong>Inbound authentication profiles</strong> related list, click <strong>Insert a new row\...</strong>, select <strong>Rest api key policy</strong>, then click <strong>Update</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-inbound-profiles-insert-row.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=d3635cd8ebaed058c4a3ddb0584cd4db" alt="Inbound authentication profiles related list showing Rest api key policy attached" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-inbound-profiles-insert-row.png" />
      </div>
    </Step>

    <Step title="Create a new policy only if none exists">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>If the list has no Table API policy at all, click <strong>New</strong> and fill in the form.</p>

        <ul>
          <li><strong>Name</strong>: enter a descriptive name (for example, `StackOne Connector Policy`)</li>
          <li><strong>Active</strong>: leave checked</li>
          <li><strong>Global</strong>: leave unchecked unless the policy should apply across all application scopes</li>
          <li><strong>REST API</strong>: select <strong>Table API</strong> (<strong>REST API PATH</strong> auto-fills to `now/table`)</li>
          <li><strong>Apply to all methods</strong>, <strong>Apply to all resources</strong>, <strong>Apply to all versions</strong>, <strong>Apply to all tables</strong>: check all four</li>
          <li>Under <strong>Inbound authentication profiles</strong>, click <strong>Insert a new row\...</strong> and add <strong>Rest api key policy</strong></li>
          <li>Click <strong>Submit</strong></li>
        </ul>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-new-policy-form.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=81cdabf2e4dd1f2ad31c44f70151ebcd" alt="New API Access Policy form with REST API set to Table API" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-new-policy-form.png" />
      </div>
    </Step>

    <Step title="Verify the Rest api key policy profile exists">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>All</strong> in the top navigation bar, type `inbound auth` in the <strong>Filter</strong> box, then click <strong>Inbound Authentication Profile</strong> under <strong>System Web Services</strong> > <strong>API Access Policies</strong>. In the <strong>Authentication Profiles</strong> list, confirm the row <strong>Rest api key policy</strong> shows <strong>Active</strong> = true. Opening the record shows <strong>Auth Parameter</strong> = <strong>Header for API Key</strong>, which makes ServiceNow read the key from the `x-sn-apikey` request header used by StackOne.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-rest-api-key-policy-profile.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=fd6b5b31d79ff639373ae5e2011d0d05" alt="Rest api key policy record with the Auth Parameter field highlighted" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-rest-api-key-policy-profile.png" />
      </div>
    </Step>

    <Step title="Create the profile only if missing">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On hardened instances the profile may have been removed. From the <strong>Authentication Profiles</strong> list, click <strong>New</strong>. When the form asks <strong>What kind of authentication profile?</strong>, select <strong>Create API Key authentication profiles</strong>, name it (for example, `Rest api key policy`), and click <strong>Submit</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/PxdKfT_CpY1KhZQN/connectors/servicenow/images/custom-config-profile-type-api-key.png?fit=max&auto=format&n=PxdKfT_CpY1KhZQN&q=85&s=bc78ca6b1889b74189777043e6fc35ad" alt="What kind of authentication profile page with Create API Key authentication profiles highlighted" width="1280" height="800" data-path="connectors/servicenow/images/custom-config-profile-type-api-key.png" />
      </div>
    </Step>

    <Step title="Verify with a test request">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>A 200 response confirms the whole chain — access policy, inbound profile, API key, and user roles — is correct.</p>

        <ul>
          <li>Run: `curl -H 'x-sn-apikey: <YOUR_TOKEN>' -H 'Accept: application/json' 'https://{your-instance}.service-now.com/api/now/table/incident?sysparm_limit=1'`</li>
          <li>Expect HTTP 200 with a JSON body containing a `result` array</li>
          <li>If you see HTTP 401 with `User is not authenticated`: confirm the Table API policy is Active with <strong>Rest api key policy</strong> attached (or <strong>Advertise all auth schemes</strong> checked), and that the <strong>Rest api key policy</strong> profile itself shows Active = true in the <strong>Authentication Profiles</strong> list</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Enter your credentials in StackOne</h2>

  <p>Collect the two values below and enter them in StackOne Hub.</p>

  <Steps>
    <Step title="Fill in the connection fields">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Each field in StackOne Hub maps to a value from the steps above.</p>

        <ul>
          <li><strong>Instance Name</strong> — the subdomain of your ServiceNow URL, without `.service-now.com`. Format: `{your-instance}`. Example: `dev12345` (from `https://dev12345.service-now.com`)</li>
          <li><strong>API Key</strong> — the <strong>Token</strong> value you copied from the REST API Key record</li>
          <li><strong>Native Webhook URL</strong> — read-only; StackOne fills this automatically for webhook events, no action needed</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<div data-whitelabel-hide>
  <h2>Linking the Account from the Hub</h2>

  <Steps>
    <Step title="Navigate to the Hub">
      Use one of the three <a href="/guides/accounts-section#linking-accounts">Linking Account Methods</a> to access the Hub.
    </Step>

    <Step title="Fill out the fields">
      Fill out the following fields using details from your provider:

      <ul>
        <li><strong>Instance Name</strong></li>
        <li><strong>API Key</strong></li>
      </ul>
    </Step>

    <Step title="Connect">
      <ul>
        <li>Click <strong>Connect</strong></li>
        <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
        <li>Once authorization is successful, you will see a confirmation popup</li>
      </ul>
    </Step>
  </Steps>

  <p>If the account linking is successful, you will see the newly linked account in your <a href="/guides/accounts-section">Accounts</a> page.</p>
</div>

## Next Steps

<Columns cols={2}>
  <Card title="Webhooks setup" href="/connectors/servicenow/guides/webhook-setup">
    <p className="connector-page-auth-description" style={{ fontSize: '14px', marginTop: 0, marginBottom: 0 }}>
      Configure receiving Events for ServiceNow into StackOne.
    </p>
  </Card>
</Columns>
