This guide describes how to get a bearer access token to authenticate your requests through our regional API gateway.
...
API | Scope description (as in API Admin) | Scope value (in API requests) |
---|---|---|
Agent Availability API | View agent availability | agents-availability:read |
Agents API | Read VCC user details, settings, and presences | users:read |
Update VCC user details, settings, and presences | users:write | |
Conversation Analyzer API | Read or download interaction content | interaction-content:read |
Insights Stats API | View Insights stats | stats |
Interactions API | Create and update active interactions | interactions:write |
Interaction Content API | Delete interaction content (e.g. call recordings, transcripts) | interaction-content:delete |
Read or download interaction content | interaction-content:read | |
Payment API | Create secure payment sessions | globalpci |
User Admin API | Read VCC user details, settings, and presences | users:read |
Update VCC user details, settings, and presences | users:write |
Getting API credentials from VCC
...
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X POST \ https://emea.newvoicemedia.com/Auth/connect/token \ -H 'content-type: application/x-www-form-urlencoded' \ -d 'grant_type=client_credentials&client_id=abcde&client_secret=12345&scope=agents-availability%3Aread' |
HTTP
Code Block | ||||
---|---|---|---|---|
| ||||
POST /Auth/connect/token HTTP/1.1 Host: emea.newvoicemedia.com Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=abcde&client_secret=12345&scope=agents-availability%3Aread |
...
- Your token expires after 2 hours. You can reuse your token as many times as you like (within any API limits set on your account) during that time. To reuse your token, simply cache it and, each time you make a request, grab the token from your cache.
- To avoid errors being returned by your API request due to an expired token, intercept
401 Unauthorized errors
with aThe access token is invalid or has expired message
that your request receives when you use your cached token. If you receive such a message, request a new token and replace the stored value with the new one.
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|