(license_keys)
- list - List License Keys
- get - Get License Key
- update - Update License Key
- get_activation - Get Activation
Get license keys connected to the given organization & filters.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.license_keys.list()
while res is not None:
# Handle items
res = res.next()
Parameter | Type | Required | Description |
---|---|---|---|
organization_id |
OptionalNullable[models.LicenseKeysListQueryParamOrganizationIDFilter] | ➖ | Filter by organization ID. |
benefit_id |
OptionalNullable[models.QueryParamBenefitIDFilter] | ➖ | Filter by benefit ID. |
page |
Optional[int] | ➖ | Page number, defaults to 1. |
limit |
Optional[int] | ➖ | Size of a page, defaults to 10. Maximum is 100. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.LicenseKeysListResponse
Error Type | Status Code | Content Type |
---|---|---|
models.Unauthorized | 401 | application/json |
models.ResourceNotFound | 404 | application/json |
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |
Get a license key.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.license_keys.get(id="<value>")
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.LicenseKeyWithActivations
Error Type | Status Code | Content Type |
---|---|---|
models.Unauthorized | 401 | application/json |
models.ResourceNotFound | 404 | application/json |
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |
Update a license key.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.license_keys.update(id="<value>", license_key_update={})
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
license_key_update |
models.LicenseKeyUpdate | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.Unauthorized | 401 | application/json |
models.ResourceNotFound | 404 | application/json |
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |
Get a license key activation.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.license_keys.get_activation(id="<value>", activation_id="<value>")
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
activation_id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.LicenseKeyActivationRead
Error Type | Status Code | Content Type |
---|---|---|
models.Unauthorized | 401 | application/json |
models.ResourceNotFound | 404 | application/json |
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |