Skip to main content

Configure API Key authentication in ServiceNow

BindTuning Team avatar
Written by BindTuning Team
Updated over 2 months ago

This tutorial is based on official ServiceNow documentation and best practices. For further details, please refer to the following resources:

API key authentication is a secure method of accessing ServiceNow APIs, ensuring that only authorized users can perform specific actions. This guide will walk you through the steps to set up API key authentication for your ServiceNow instance and how to use it to connect Automate365 to ServiceNow data.


Configure API Key authentication in ServiceNow

API Key authentication provides a straightforward method for securely integrating Automate365 with your ServiceNow instance. This method relies on a unique API key for authorization, ensuring only approved applications can access your data.

Step 1: Access your ServiceNow instance

First, log in to your ServiceNow instance using your administrator credentials. Navigate to the main dashboard to begin configuring API access.

Step 2: Create an Inbound Authentication Profile

This step involves registering Automate365 as an OAuth application within ServiceNow.

We'll start by creating an authentication profile to define how API keys will be handled.

  1. In the top-left filter navigator, type Inbound Authentication Profile.

  2. Navigate to System Web Services > API Access Policies > Inbound Authentication Profile.

  3. Click New in the top-right corner.

  4. Select Create API Key authentication profiles.

  5. Fill out the form:

    • Name: Give the authentication policy a meaningful name. (You will need this name in Step 4).

    • Application: Select the scope of the authentication policy.

    • Auth Parameter: Select the parameter for the authentication request. You can choose a default option or create a new one. (The Parameter Name and Type selected here will be required when configuring the Automate365 connection).

  6. Click Submit.

Step 3: Create a REST API Key

Next, we'll generate the actual API key.

  1. In the filter navigator, search for REST API Key.

  2. Navigate to System Web Services > API Access Policies > REST API Key.

  3. Click New in the top-right corner.

  4. Fill out the form. For the User field, select the user account this key will authenticate (e.g., a dedicated service account).

  5. Click Submit. The token will be generated upon submission.

  6. Open the newly created API Key settings and click the lock icon to view the token.

Take note: The Token generated here is crucial for configuring the Automate365 connection. Ensure you copy this value immediately, as it is a secret key and may not be viewable again after you leave this page.

Step 4: Create a REST API Access Policy

Finally, create an access policy to apply the API key authentication to the desired REST API (in this case, the Table API).

  1. In the filter navigator, search for REST API Access Policies.

  2. Navigate to System Web Services > API Access Policies > REST API Access Policies.

  3. Click New in the top-right corner.

  4. Fill out the form:

    • Name: Provide a meaningful name for this access policy.

    • Active: Ensure this policy is marked as active.

    • Rest API: Select the REST API to which this access policy applies. For Automate365 Automations, select Table API.

    • Leave all "Applys..." checks selected.

  5. Under Authentication profile:

    • Click the Insert a new row button.

    • Type the name of the Authentication Profile you created in Step 2, or click the search icon to select it.


Connect ServiceNow to Automate365

Now that your API Key authentication is set up in ServiceNow, you can use it to connect securely to Automate365. When setting up the ServiceNow connection within an Automation:

  • Use the API Token value you obtained from ServiceNow (as explained in Part 1).

Refer to our article Connect to ServiceNow, for the full instructions on setting up and configuring the connection.

Did this answer your question?