Get an Access Token from Postman

You can use your preferred REST API testing tool, such as Postman, to obtain a token for the CAM REST API.

To get an access token from Postman:

  1. Create a new Request in Postman.
  2. Select the POST method.
  3. In the Enter request URL box, add the CAM server URL for the oauth2 path. Example: https://{servername} /cam/oauth2/token.
  4. Select Body, and then change the format to JSON.
  5. Change the model data in the Edit Value box to:
    Option Description
    grant_type "password"
    client_id The API key generated in CAM Administrator. See Create an API Key.
    username Name of an authorized CAM user.
    password Password for the specified user name.
    scope "cam"
    An access token and a refresh token are returned in the 200 response section.
  6. Select Send.
    Tokens are returned in the 200 response section.
  7. Use the returned token as an Authorization Bearer Token in Postman for subsequent API calls.
Access tokens have a lifetime based on settings in the API key used. When an access key expires, you must generate a new access token. See Get an Access Token.