Requests (Authentication API)

Request parameters

Header parameters

content-Type

Required The content-Type parameter describes the type of the content that you send in the request body. The token endpoint can only accept URL encoded content so you must set the content-type parameter to application/x-www-form-urlencoded.

Example content-Type: application/x-www-form-urlencoded

Request body parameters

grant_type

Required All requests to the token endpoint require the grant_type parameter in the body of the request. You must set grant_type to ‘client_credentials’. A grant type of client credentials indicates that you are using OAuth 2.0 for authorization.

Example grant_type=client_credentials

scope

Required The scope parameter identifies the API for which you need a bearer access token and what level of access you will have to that API.

Example scope=stats

client_id

Required The client ID identifies your account to the token endpoint.

Example client_id=abcde

client_secret

Required The secret is like a password that enables you to use the API with your account.

Example client_secret=12345

Path parameters

None.

Query string parameters

None.

Example request

cURL

curl -X POST \
  https://emea.cc.vonage.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

POST /Auth/connect/token HTTP/1.1
Host: emea.cc.vonage.com
Content-Type: application/x-www-form-urlencoded
 
grant_type=client_credentials&client_id=abcde&client_secret=12345&scope=agents-availability%3Aread