(allowlist_identifiers)
- list - List all identifiers on the allow-list
- create - Add identifier to the allow-list
- delete - Delete identifier from allow-list
Get a list of all identifiers allowed to sign up to an instance
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.allowlist_identifiers.list(paginated=False)
assert res is not None
# Handle response
print(res)
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
paginated |
Optional[bool] | ➖ | Whether to paginate the results. If true, the results will be paginated. If false, the results will not be paginated. |
|
limit |
Optional[int] | ➖ | Applies a limit to the number of results returned. Can be used for paginating the results together with offset . |
20 |
offset |
Optional[int] | ➖ | Skip the first offset results when paginating.Needs to be an integer greater or equal to zero. To be used in conjunction with limit . |
10 |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
List[models.AllowlistIdentifier]
Error Type | Status Code | Content Type |
---|---|---|
models.ClerkErrors | 401, 402 | application/json |
models.SDKError | 4XX, 5XX | */* |
Create an identifier allowed to sign up to an instance
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.allowlist_identifiers.create(request={
"identifier": "[email protected]",
})
assert res is not None
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.CreateAllowlistIdentifierRequestBody | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.ClerkErrors | 400, 402, 422 | application/json |
models.SDKError | 4XX, 5XX | */* |
Delete an identifier from the instance allow-list
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.allowlist_identifiers.delete(identifier_id="example_identifier_id")
assert res is not None
# Handle response
print(res)
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
identifier_id |
str | ✔️ | The ID of the identifier to delete from the allow-list | example_identifier_id |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.ClerkErrors | 402, 404 | application/json |
models.SDKError | 4XX, 5XX | */* |