CSM 10.5 Documentation

Home

Get Access Token using Postman

You can use your preferred API testing tool, such as Postman, to obtain an access token for the Cherwell REST API.

To obtain an access token using Postman:

  1. Create a new request in Postman.
  2. Select the POST method.
  3. Enter http://yourservername/CherwellApi/token for the server address, substituting your own server name or ip address.
  4. In the body of the POST request, enter the following, substituting your own values for the parameters in the table.
                                        grant_type=password&client_id={YourClientID}&username={YourUsername}&password={YourPassword}
                                    
    Parameter Value
    grant_type "password"
    client_id As generated using CSM Administrator. See Obtaining API Client IDs.
    username Username.
    password Password for the username.
  5. CSM validates the client ID using the token store.
    An access token is returned in the response section.
    {
      "access_token": "SampleAccessTokenValue",
      "token_type": "bearer",
      "expires_in": 1199,
      "refresh_token": "SampleRefreshTokenValue",
      "as:client_id": "SampleClientIdValue",
      "username": "Username",
      ".issued": "Mon, 17 June 2019 15:31:39 GMT",
      ".expires": "Mon, 17 June 2019 15:51:39 GMT"
    }

Was this article useful?