Generate an access token to authenticate your API requests
Before calling any protected API, your application must obtain an access token from the SingleView authentication service. The access token identifies your application and authorizes it to access the APIs included in your subscription.
Access tokens are generated using the Client Credentials grant type and must be included in the Authorization header of every subsequent API request.
Endpoint | Method | Headers |
|---|---|---|
| POST |
|
curl --location 'https://sandboxapi.onesingleview.com/v1/api/svplatform/tokenOauth2' \
--header 'CompanyId: MYCOMPANY' \
--header 'SVReferenceID: BEMC0001' \
--header 'DateTimeStamp: 2025-01-02T10:20:39' \
--header 'Device: Web' \
--header 'Content-Type: application/json' \
--data-raw '{
"clientId": "abcdef83643f61c975",
"clientCode": "zyxvw95cE163C03b7d1",
"grant_type": "client_credentials"
}'Request parameters
Parameter | Type | Description | Required |
|---|---|---|---|
| String | Client identifier issued during onboarding. | Yes |
| String | Client secret or client code issued during onboarding. | Yes |
| String | OAuth grant type. Set to | Yes |
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoiTDNyMmpxV29JS2I4MTNodDBNMlZ4WGpFZmR6WFNWaTFad3B5QnlkOVpHelZXR2ZwUmFQNUV1TXl6S1Aybi94Y0lwR2V5STNNMkdPL1pqakd4ZG0yclJKUkdhRXlaWGNpWnZnOHArMWIyOGtOQTVkZ0VKajVVSEdiTmtNPSIsImlhdCI6MTczNTgwMTQ3NywiZXhwIjoxNzM1ODA1MDc3fQ.Bh7LFkvxNFrLe9dmH5rURWjGpES-u4z2EGeyrNM7z6E",
"token_type": "Bearer",
"expires_in": "6000"
}Response parameters
Parameter | Description |
|---|---|
| The OAuth access token used to authenticate subsequent API requests. |
| Indicates the authentication scheme. The value is |
| The validity period of the access token, in seconds. |
After obtaining the access token, include it in the Authorization header of every protected API request.
Authorization: Bearer <access_token>Replace <access_token> with the token returned by the authentication service.
clientId and clientCode as confidential credentials