Get a new STS token.
At this moment, only a selected set of Talkdesk API's supports STS tokens. Please refer to each API documentation to learn more.
Europe (EU) and Canada (CA) Base URLs
EU - https://{talkdesk-account-name}.talkdeskid.eu/oauth/token
CA - https://{talkdesk-account-name}.talkdeskidca.com/oauth/token
Client Authentication
The requests made to the token service must be signed - leveraging HTTP Basic Authentication and Base64 encoding the client_id
and client_secret
:
$ echo -n '<client_id>:<client_secret>' | openssl base64
PGNsaWVudF9pZD46PGNsaWVudF9zZWNyZXQ+
require 'base64'
Base64.strict_encode64('<client_id>:<client_secret>')
# PGNsaWVudF9pZD46PGNsaWVudF9zZWNyZXQ+
import base64
base64.b64encode('<client_id>:<client_secret>')
# PGNsaWVudF9pZD46PGNsaWVudF9zZWNyZXQ+
echo -n 'clientId:clientSecret' | base64
$b = [System.Text.Encoding]::UTF8.GetBytes("clientId:clientSecret")
Body Response - Schema
200 (the STS token generated, along with some additional properties about the authorization)
Parameter | Type | Description | Required |
---|---|---|---|
access_token | string | the sts token | yes |
token_type | string | The type of token to be specified in the authorization header. | yes |
expires_in | integer | duration of time (seconds) the access token is granted for | yes |
scope | string | A space-separated list of scopes (URL encoded) the client requested access to. If the "scope" parameter is not provided in the request body parameter, the returned value will be the list of scopes the client granted. | yes |
400 (bad request), 401 (unauthorized)
Parameter | Type | Description | Required |
---|---|---|---|
error | string | n/a | yes |
error_description | string | n/a | yes |
Troubleshooting
If you have questions or technical issues, please open a ticket using this form.
Access Token Request
After obtaining the STS token, the requests to invoke Talkdesk APIs must have an Authorization header with the STS token (the Bearer string should be discarded).
#Header example
Authorization: <sts-token>
Although the maximum TTL is up to 1 year, STS tokens can live forever as long as they are being used.