...
The access token is obtained by making POST
request to authorization endpoint https://auth.voipex.io/token
. The post body must be formatted by using x-www-form-urlencoded
.
Parameter | Value |
---|---|
| password |
| api |
| <access_email> |
| <access_password> |
| openid profile |
Example:
curl -d "grant_type=password&client_id=api&username=<access_email>&password=<access_password>" -H "Content-Type: application/x-www-form-urlencoded" -X POST https://auth.voipex.io/token
...
The access token is valid for 1 hour50 minutes. After that time the client needs to obtain a new access token by using refresh_token
and making aPOST
request to authorization endpoint URL (https://auth.voipex.io/token
). The post body for this specific method must also be formatted by using x-www-form-urlencoded
.
Parameter | Value |
---|---|
| refresh_token |
| api |
| <refresh_token> |
Example:
curl --location --request POST 'https://auth.voipex.io/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'client_id=api' --data-urlencode 'grant_type=refresh_token' --data-urlencode 'refresh_token=eyJhb...'
...
POST
request to https://auth.voipex.io/token-exchange
. Access e-mail is e-mail of user for whom the impersonation will be performed. The impersonification can be performed by the user who has impersonation enabled in the api access.
Parameter | Value |
---|---|
| <email/login assigned to a user that you want to impersonate> |
Example
curl --location --request POST 'https://auth.voipex.io/token-exchange' --header 'Authorization: Bearer eyJhb...' --header 'Content-Type: application/json' --data-raw '{"email": "<email>"}'
...