For the complete documentation index, see llms.txt. This page is also available as Markdown.

Management API Authorization

All requests to the server need to be authorized with the management API key. A management API key is sent as an authorization header value.

Each request from the client needs to have the following header:

  • Authorization, with the following value: Api-Key _here_is_the_management_api_key_

Example:

Management API key for this example is h8ZTleS1.OyCHhCST5c8K9A6gjV9wA1HLxWpUVSFv.

Header:

  • Authorization: Api-Key h8ZTleS1.OyCHhCST5c8K9A6gjV9wA1HLxWpUVSFv

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

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?