(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.
Good to Know
- This example uses Paris release for ServiceNow.
- 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.
Step 1: Start Creating an Access Token in AgilePoint NX
First, create a new access token in AgilePoint NX for ServiceNow.
How to Start
- There is more than one way to create an access token.
For more information, refer to Access Token for ServiceNow.
Procedure
- In AgilePoint NX, open the access token configuration screen for ServiceNow.
- Select OAuth 2.0 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
- In a new web browser tab, sign in to your ServiceNow Developer account:
Procedure
- In ServiceNow, on the right pane, click Request Instance.
- On the Request an Instance screen, in the Choose your release section, select your release.
- Click Request.
The Your instance is ready! screen shows the Instance URL and the login credentials for your Instance.
Step 3: Copy an Instance Name in ServiceNow
Next, copy an instance name in ServiceNow.
How to Start
- In one web browser tab, open the Your instance is ready! screen.
For more information, refer to Create an Instance in ServiceNow.
- In a different web browser tab, in AgilePoint NX, open the ServiceNow access token configuration screen.
Procedure
- In ServiceNow, on the Your instance is ready! screen, copy the instance name in your instance URL.
- In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Instance Name field, paste the instance name value from ServiceNow.
- In ServiceNow, on the Your instance is ready! screen, click 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
- On the ServiceNow screen, in the left pane, click your instance URL.
A new tab or window opens in your web browser.
- In a new web browser tab, sign in to your ServiceNow Instance.
Procedure
- In ServiceNow, on the left pane, in the Filter navigator field, enter OAuth.
- In the System OAuth tab, click Application Registry.
- In the Application Registries screen, click New.
- On the OAuth application screen, in the What kind of OAuth Authentication? section, click Create an OAuth API endpoint for external clients.
- 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.
- Click Submit.
The Application Registries screen shows.
Step 5: Copy the ServiceNow App Credentials
Next, copy the ServiceNow app credentials to your AgilePoint NX access token.
How to Start
- 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.
- In a different web browser tab, in AgilePoint NX, open the ServiceNow access token configuration screen.
Procedure
- In ServiceNow, on the Application Registries - AgilePoint NX Sales Invoice App screen, in the Client ID field, copy the Client ID value.
- In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Client ID field, paste the Client ID value from ServiceNow.
- 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.
- Copy the Client Secret value.
- In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Client Secret ID field, paste the Client Secret value from ServiceNow.
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
- In one web browser tab, in AgilePoint NX, open the ServiceNow access token configuration screen.
- 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
- 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.
- In ServiceNow, on the Application Registries - AgilePoint NX Sales Invoice App screen, in the Redirect URL field, click Edit this URL.
- Paste the Redirect URL value from AgilePoint NX.
- Click Update.
Step 7: Complete the AgilePoint NX Access Token
Next, complete the AgilePoint NX access token configuration for ServiceNow.
How to Start
- In AgilePoint NX, open the ServiceNow access token configuration screen.
Procedure
- In AgilePoint NX, on the ServiceNow Access Token Configuration screen, in the Token Name field, enter a name for the access token.
- Click Get OAuth 2.0 Access Token.
A new tab or window opens in your web browser.
- On the new tab, in the ServiceNow screen, click Allow.
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.
- Click Done.