Skip to main content
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.

Find your instance name

Your instance name is the subdomain of your ServiceNow URL, without .service-now.com.

  • Format: {your-instance}
  • Example: if your URL is https://dev12345.service-now.com, your instance name is dev12345
  • Copy the Instance Name across.

Generate an API Key

The key acts as the user you select, so that user needs roles that grant Table API access.

1

Create the API key

Sign in to your instance at https://{your-instance}.service-now.com, click All in the top navigation bar, type rest api key in the Filter box, then open System Web Services > REST API Key.

  • Click New in the API Keys list.
  • Name: a name for the key
  • User: select the user the key acts as. This user needs roles that grant Table API access (such as admin or itil)
  • Active: leave checked
  • Expiry: leave empty for no expiration, or set a future date
  • Click Submit.
New REST API Key form with the User field highlighted
2

Copy the generated Token

ServiceNow generates the Token when you save the key. Copy the Token across into API Key.

  • From the API Keys list, reopen the record you just created.
  • Click the lock icon next to the masked Token field to reveal the value.
Saved REST API Key record with the masked Token field highlighted
3

Verify user permissions

Click All in the top navigation bar, type users in the Filter box, then open User Administration > Users.

  • Open the user you selected for the API key.
  • Confirm it has the roles required for Table API access (such as admin, itil, or rest_service).
  • Add any missing roles.
All menu filtered to show Users under User Administration

Allow API Key Auth on the Table API

The Table API access policy must explicitly accept API Key authentication.

1

Verify the Rest api key policy profile exists

Click All in the top navigation bar, type inbound auth in the Filter box, then open System Web Services > API Access Policies > Inbound Authentication Profile.

  • In the Authentication Profiles list, confirm the row Rest api key policy shows Active = true.
  • Open the record and confirm Auth Parameter = Header for API Key.
Rest api key policy record with the Auth Parameter field highlighted
2

Create the profile only if missing

Create the profile only if the Authentication Profiles list does not have it.

  • Click New.
  • What kind of authentication profile?: select Create API Key authentication profiles
  • Name: Rest api key policy
  • Click Submit.
What kind of authentication profile page with Create API Key authentication profiles highlighted
3

Find the Table API policy

Click All in the top navigation bar, type rest api access in the Filter box, then open System Web Services > API Access Policies > REST API Access Policies.
In the API Access Policies list, find the policy where REST API = Table API and REST API PATH = 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 separate GET and POST policies, attach the profile to each one.
  • If no Table API policy exists, create one.
API Access Policies list with the Table API policy row highlighted
4

Create a new policy only if none exists

Create a policy only if the list has no Table API policy.

  • Click New.
  • Name: a name for the policy
  • Active: leave checked
  • Global: leave unchecked unless the policy should apply across all application scopes
  • REST API: select Table API (REST API PATH auto-fills to now/table)
  • Apply to all methods: checked
  • Apply to all resources: checked
  • Apply to all versions: checked
  • Apply to all tables: checked
  • Under Inbound authentication profiles, click Insert a new row….
  • Select Rest api key policy.
  • Click Submit.
New API Access Policy form with REST API set to Table API
5

Add the Rest api key policy profile

Open the Table API policy record and scroll to the Inbound authentication profiles related list.

  • Click Insert a new row….
  • Select Rest api key policy.
  • Click Update.
Inbound authentication profiles related list showing Rest api key policy attached
6

Verify with a test request

A 200 response confirms the access policy, inbound profile, API key, and user roles are correct.

  • 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'
  • Expect HTTP 200 with a JSON body containing a result array.
1

Connect

  • Click Connect.
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup.
2

Use Actions

Connect an AI platform to the linked account’s actions. See AI Platforms.Other ways to call actions are listed in Protocols & SDKs.

Next Steps

Webhooks setup

Configure receiving Events for ServiceNow into StackOne.