Skip to content

Sigma API

The Sigma API contains various RESTful endpoints to interact with your K-Cells. See the Sigma API endpoints page for details of the full API. To use this please ensure that you have created a valid client ID and client secret as describer in the credentials page and a valid K-Cell contract.

Server Credentials

Server to server communication is carried out using OAuth2 Client Credentials Flow. Your login credentials are the base64 encoded client ID and secret generated in the CONNECT application. These credentials are exchanged for a JWT token used for accessing the sigma API.

Fetch a JWT token

To request a JWT token you first have to base64 encode your client ID and secret to form your API_KEY. Additionally, please ensure OpenSSL is installed on the computer being used, as it is utilised in the following command.

echo -n 'clientId:clientSecret' | openssl base64

Using the returned value you can request your JWT token as follows using a base64 encoded HTTP Basic Authorisation header:

 curl -X POST  https://auth.sigma.krucial.cloud/oauth2/token  -H 'authorization: Basic {API_KEY}'  -H 'content-type: application/x-www-form-urlencoded'  -d 'grant_type=client_credentials'

This should return an access_token, which is a JWT.

{
    "access_token": "******************.afFa35AeJIi**************************************************fQ.*****************************************************************HLaW********************************k-*******************-0aDBMaMtJU-QMfeFJkN2UgKQhtzi2dbLBB06dQEd6gcx*****************************************************************h-*****************",
    "expires_in": 3600,
    "token_type": "Bearer"
}

See jwt.io for tools for verifying your key signature and more details regarding JWTs.