Authentication
CartonCloud authentication follows the OAuth2 specifications.
Tenants and customers integrating with the API are required to use the client credentials grant type to obtain an Access Token.
For information on generating API Keys, refer to our Knowledge Base Article: API Clients
Client Credentials
An access token can be obtained using the client credentials
HTTP Request
Example Request
Code
POST https://api.cartoncloud.com/uaa/oauth2/token
POST /uaa/oauth/token is still accepted; the gateway rewrites it to /uaa/oauth2/token.
Authentication
The following client credentials can be obtained from a user with administrator access. The clientId and clientSecret should be set in the HTTP Basic Auth Header
| Credential | Description |
|---|---|
clientId | The username for requests to the token end point |
clientSecret | The password for requests to the token end point |
Request Parameters
| Parameter | Description |
|---|---|
grant_type | Must be client_credentials |
Response Properties
Example Response JSON
Code
| Property | Description |
|---|---|
access_token | Access token to be used to authenticate subsequent API requests |
token_type | Will always be bearer |
expires_in | The number of seconds after which the access token will expire and will no longer be valid |
Access Token
Example Request
Code
With every API request a valid access token must be supplied in the request header as a Bearer Tokens
Authorization: Bearer {accessToken}
Software Vendors
Software vendors interested in providing out of the box integration into CartonCloud are required to use OAuth2 authorization code flow to connect.