OAuth2 Authentication
For OAuth2 authentication, there are two grant types:
-
Password
-
Refresh Token
Note
For the most current information about using OAuth2 Authentication, refer to the OAuth API Request Parameters in the ServiceNow documentation.
In the Grant Type drop-down list, select either Password or Refresh Token grant type.
-
In the Token URL field, enter the location of the token endpoint that the instance uses to retrieve token. For example:
https://<instancename>.service-now.com/oauth_token.do
-
In the Username, Password, Client ID, and Client Secret fields, enter the respective values for OAuth2 authentication.
-
In the Token URL field, enter the location of the token endpoint that the instance uses to retrieve token.
-
In the Refresh Token field, enter the refresh token for OAuth2 authentication. Refer to the ServiceNow documentation for information about creating an endpoint for client access a ServiceNow instance.
Use the following curl command to create refresh token:
Copy$ curl -d "grant_type=password&client_id=<your_client_id>
&client_secret=<your_client_password>
&username=admin&password=admin"
POST https://instancename.service-now.com/oauth_token.do -
In the Client ID and Client Secret fields, enter the values for OAuth2 authentication.