Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To use the Agents API, you need a bearer access token. Your bearer access token authenticates your request to the API. The API will check that you are authorized to make requests.

Getting a bearer access token

Use Vonage Contact Center’s Authentication API to get your bearer access token. For information about using the API to get a bearer access token, see Getting your bearer access token in How to authenticate with a Vonage Contact Center (VCC) API.

When requesting your bearer access token, depending on which endpoint you want to call, use required scope from the table below as the value for scope.

endpointrequired scope
GET /presence-definitionsadmin:read or admin:write or self:read or self:write or users:read or users:write
GET /{userId}/presenceself:read or self:write or users:read or users:write
PATCH /{userId}/presenceself:write or users:write
GET /presences/users?userId={userIdsCommaSeperated}users:read or users:write

Token expiration

Your bearer access token is only valid for use for two hours after being issued. After this time, the token expires and you must request a new token.

Using a bearer access token

When you have got your bearer access token, you must use the token to authenticate every request you make to the Agents API. For information about using the bearer access token, see Using your bearer access token in How to authenticate with a Vonage Contact Center (VCC) API.