Interactive Code Examples

Explore JWT Kid Authentication with our comprehensive examples and testing tools

Interactive Colab Notebook

We've created a fully interactive Google Colab notebook that guides you through the entire process of working with our API.

What's Included in the Notebook?

Private key and CSR generation
Certificate validation and handling
JWT creation and signing
Complete license update API workflow
JTI and expiration time handling
Response parsing and error handling

Note: This notebook implements all the authentication requirements detailed in our Authentication documentation, including proper handling of JTI and expiration time.

Open in Google Colab

The notebook runs in your browser and doesn't require any local installation

How to Use the Notebook

1

Open the Notebook

Click the button above to launch the notebook in Google Colab in your browser.

2

Run the Cells

Execute each cell in sequence by clicking the play button or pressing Shift+Enter.

3

Experiment

Modify values, try different parameters, and see how the API responds.

Example Python Request

import requests

url = "https://api.xima.cloud/v1/licensing"
payload = {
    "ccId": {
        "resellerId": "reseller-123",
        "resellerName": "Acme Distribution",
        "tenantId": "tenant-456",
        "tenantName": "West Coast Sales"
    },
    "sipCredentials": {
        "username": "sipuser",
        "password": "sippass",
        "sipServer": "sip.provider.com",
        "sipPort": 5061,
        "transport": "tls",
        "outboundProxy": "outbound.provider.com"
    },
    "aiMessaging": {
        "standardBundles": 5,
        "advancedBundles": 0
    },
    "aiAudioServices": {
        "additionalHours": 20
    },
    "essentialSeats": 10,
    # ...other seat fields...
}
headers = {"Authorization": "Bearer ", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())