CartonCloud
Guides

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

TerminalCode
curl -u {clientId}:{clientSecret} \ "https://api.cartoncloud.com/uaa/oauth/token" \ -X POST \ -H "Accept-Version: 8" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d grant_type="client_credentials"

POST https://api.cartoncloud.com/uaa/oauth/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

CredentialDescription
clientIdThe username for requests to the token end point
clientSecretThe password for requests to the token end point

Request Parameters

ParameterDescription
grant_typeMust be client_credentials

Response Properties

Example Response JSON

JSONCode
{ "access_token": "{accessToken}", "token_type": "bearer", "expires_in": 3600 }
PropertyDescription
access_tokenAccess token to be used to authenticate subsequent API requests
token_typeWill always be bearer
expires_inThe number of seconds after which the access token will expire and will no longer be valid

Access Token

Example Request

TerminalCode
# Send the access token with every request curl "https://api_endpoint" \ -H "Accept-Version: 8" \ -H "Authorization: Bearer {accessToken}"

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.

Last modified on