Management API Authorization

All requests to the server must be authorized with the management API key. Include the management API key as the value of the Authorization header.

circle-info

Each request must include this header:

Authorization: Api-Key your_management_api_key_here

Example header (using the example management API key):

Authorization: Api-Key h8ZTleS1.OyCHhCST5c8K9A6gjV9wA1HLxWpUVSFv

Full sample code for getting a license key with the management API key:

generate_license.py
import requests

API_URL = 'https://saas.licensespring.com'

# Can be found in `Settings` -> `Settings` -> `Keys`
API_KEY = '_your_management_api_key_goes_here_'

# Send request
product_short_code = '_your_product_short_code_goes_here_'
quantity = 1 # Replace with desired quantity

response = requests.get(
    url='{}{}'.format(API_URL, '/api/v1/orders/generate_license/'),
    params={'product': product_short_code, 'quantity': quantity},
    headers={
        'Authorization': 'Api-Key {}'.format(API_KEY)
    }
)

print(response.json())

Last updated

Was this helpful?