API reference · Authentication
Get Access Token
https://api.sandbox.cws.digital/oauth/tokenDescription
Authenticates a platform user and returns the access_token used in all other API calls.
It is the only endpoint that does not require a token. It carries its own Authorization header, with the fixed credential of the integration client, already filled in the Try it panel and in the Postman collection downloaded from the portal.
Request body
application/x-www-form-urlencodedRequired| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| scope | string | No |
| |
| grant_type | string | Yes | Always Allowed values: password | |
| username | string | Yes | E-mail of your user on the CWS platform. | |
| password | string | Yes | Password of your user on the CWS platform. |
Business rules
Validity
The access_token is valid for 12 hours (expires_in arrives as 43199, in seconds). When it expires, authenticate again at this same URL.
How to send the token in the other calls
The header is Authorization: Bearer <access_token>, with the Bearer prefix. Without it, the request is rejected with 401.
In the Try it panel, this is already set up: the token returned by this endpoint is saved in this browser tab and filled in on the other endpoints. You do not need to copy anything.
In the Postman collection downloaded from the portal, this request stores the token in the access_token variable, and the other requests inherit the collection header.