(Example) How to Get the Access Token Credentials from ServiceNow

To get the access token credentials from ServiceNow, do the procedure in this topic.

Background and Setup

Prerequisites

  • A ServiceNow Developer account.
  • You can use one of these releases for the ServiceNow Instance:
    • Paris
    • Orlando
    • New York
    • Madrid
    • London
    This example uses Paris release.

Good to Know

  • OAuth 2.0 access tokens require a 2-way exchange of credentials between AgilePoint NX and the external service. This means that you must get the credentials from the third-party service to paste in the AgilePoint NX access token, and get the redirect URI from AgilePoint NX to paste in the external service. This requires you to open both the AgilePoint NX access token and the third-party service at the same time, so you can copy and paste from one screen to the other.

    This topic shows the suggested procedure for ServiceNow. The exact procedure for your access token depends on whether you already have a connection (usually called an app) configured in the external service.

  • This topic gives one example. The procedure may vary depending on your configuration and account settings in the third-party service.
  • Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation. It is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business use cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, or other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

Step 1: Start Creating an Access Token in AgilePoint NX

First, create a new access token in AgilePoint NX for ServiceNow.

How to Start

Procedure

  1. In AgilePoint NX, open the access token configuration screen for ServiceNow.

    ServiceNow Access Token screen
  2. Select OAuth 2.0 Authentication.

    Select Oauth20 Authentication

    Do not configure the access token credentials.

    Keep the access token configuration screen open in AgilePoint NX, but do not save it.

Step 2: Create an Instance in ServiceNow

Next, create an instance in ServiceNow.

How to Start

  1. In a new web browser tab, sign in to your ServiceNow Developer account:

Procedure

  1. In ServiceNow, on the right pane, click Request Instance.

    Click Request Instance
  2. On the Request an Instance screen, in the Choose your release section, select your release.

    Select Release
  3. Click Request.

    Click Request

    The Your instance is ready! screen shows the Instance URL and the login credentials for your Instance.


    New Instance

Step 3: Copy an Instance Name in ServiceNow

Next, copy an instance name in ServiceNow.

How to Start

  1. In one web browser tab, open the Your instance is ready! screen.

    For more information, refer to Create an Instance in ServiceNow.

  2. In a different web browser tab, in AgilePoint NX, open the ServiceNow access token configuration screen.

Procedure

  1. In ServiceNow, on the Your instance is ready! screen, copy the instance name in your instance URL.

    Copy Instance Name
  2. In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Instance Name field, paste the instance name value from ServiceNow.

    Paste ServiceNow
  3. In ServiceNow, on the Your instance is ready! screen, click Return to the Developer Site.

    Return to the Developer Site

    The ServiceNow screen shows.

Step 4: Create an App in ServiceNow

Next, create an app in ServiceNow.

How to Start

  1. On the ServiceNow screen, in the left pane, click your instance URL.

    Copy Instance Url

    A new tab or window opens in your web browser.

  2. In a new web browser tab, sign in to your ServiceNow Instance.

Procedure

  1. In ServiceNow, on the left pane, in the Filter navigator field, enter OAuth.

    Enter OAuth
  2. In the System OAuth tab, click Application Registry.

    Click Application Registry
  3. In the Application Registries screen, click New.

    Click New
  4. On the OAuth application screen, in the What kind of OAuth Authentication? section, click Create an OAuth API endpoint for external clients.

    Click Oauth Api
  5. On the Application Registries - New Record screen, in the Name field, enter an app name.

    AgilePoint recommends you use an app name associated with your AgilePoint NX app or the way you want to use the app in AgilePoint NX.


    App name
  6. Click Submit.

    Click Submit

    The Application Registries screen shows.


    Application Registries screen

Step 5: Copy the ServiceNow App Credentials

Next, copy the ServiceNow app credentials to your AgilePoint NX access token.

How to Start

  1. In one web browser tab, on the Application Registries screen, open the app you created in ServiceNow.

    For more information, refer to Create an App in ServiceNow.

  2. In a different web browser tab, in AgilePoint NX, open the ServiceNow access token configuration screen.

Procedure

  1. In ServiceNow, on the Application Registries - AgilePoint NX Sales Invoice App screen, in the Client ID field, copy the Client ID value.

    Copy Client Id
  2. In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Client ID field, paste the Client ID value from ServiceNow.

    Paste Client ID
  3. In ServiceNow, to view the client secret, on the Application Registries - AgilePoint NX Sales Invoice App screen, in the Client Secret field, click Toggle Password Visibility.

    Client Secret
  4. Copy the Client Secret value.

    Copy Client Secret
  5. In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Client Secret ID field, paste the Client Secret value from ServiceNow.

    Paste Client Secret

Step 6: Configure the Redirect URI for ServiceNow

Next, configure the Redirect URL in the ServiceNow app that connects your AgilePoint NX app.

How to Start

  1. In one web browser tab, in AgilePoint NX, open the ServiceNow access token configuration screen.
  2. In a different web browser tab, open the Application Registries - AgilePoint NX Sales Invoice App screen.

    For more information, refer to Copy the ServiceNow App Credentials.

Procedure

  1. In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Redirect URL field, copy the Redirect URL value.

    This is an example value. In a production environment, copy the actual Redirect URL from AgilePoint NX.


    Copy Redirect URL
  2. In ServiceNow, on the Application Registries - AgilePoint NX Sales Invoice App screen, in the Redirect URL field, click Edit this URL.

    Edit Redirect URL
  3. Paste the Redirect URL value from AgilePoint NX.

    Paste Redirect URL
  4. Click Update.

    Click Update

Step 7: Complete the AgilePoint NX Access Token

Next, complete the AgilePoint NX access token configuration for ServiceNow.

How to Start

  1. In AgilePoint NX, open the ServiceNow access token configuration screen.

Procedure

  1. In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Token Name field, enter a name for the access token.

    ServiceNow Access Token screen
  2. Click Get OAuth 2.0 Access Token.

    Get OAuth2 Access Token

    A new tab or window opens in your web browser.

  3. On the new tab, in the ServiceNow screen, click Allow.

    Grant Box Access

    The new tab or window closes in your web browser, and the ServiceNow access token screen shows the OAuth 2.0 access token in the OAuth 2.0 Access Token field.


    OAuth2 Access Token
  4. Click Done.

    Save Access Token