(allowlist_blocklist)
- list_allowlist_identifiers - List all identifiers on the allow-list
- create_allowlist_identifier - Add identifier to the allow-list
- create_blocklist_identifier - Add identifier to the block-list
- delete_blocklist_identifier - Delete identifier from block-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 s:
res = s.allowlist_blocklist.list_allowlist_identifiers()
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
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 s:
res = s.allowlist_blocklist.create_allowlist_identifier(identifier="user@example.com", notify=True)
if res is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
identifier |
str | ✔️ | The identifier to be added in the allow-list. This can be an email address, a phone number or a web3 wallet. |
user@example.com |
notify |
Optional[bool] | ➖ | This flag denotes whether the given identifier will receive an invitation to join the application. Note that this only works for email address and phone number identifiers. |
true |
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 | */* |
Create an identifier that is blocked from accessing an instance
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as s:
res = s.allowlist_blocklist.create_blocklist_identifier(identifier="example@example.com")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
identifier |
str | ✔️ | The identifier to be added in the block-list. This can be an email address, a phone number or a web3 wallet. |
example@example.com |
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 block-list
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as s:
res = s.allowlist_blocklist.delete_blocklist_identifier(identifier_id="identifier123")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
identifier_id |
str | ✔️ | The ID of the identifier to delete from the block-list | identifier123 |
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 | */* |