Skip to content

Latest commit

 

History

History
163 lines (108 loc) · 12.1 KB

File metadata and controls

163 lines (108 loc) · 12.1 KB

AllowlistBlocklist

(allowlist_blocklist)

Overview

Available Operations

list_allowlist_identifiers

Get a list of all identifiers allowed to sign up to an instance

Example Usage

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

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

List[models.AllowlistIdentifier]

Errors

Error Type Status Code Content Type
models.ClerkErrors 401, 402 application/json
models.SDKError 4XX, 5XX */*

create_allowlist_identifier

Create an identifier allowed to sign up to an instance

Example Usage

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

Parameters

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.

Response

models.AllowlistIdentifier

Errors

Error Type Status Code Content Type
models.ClerkErrors 400, 402, 422 application/json
models.SDKError 4XX, 5XX */*

create_blocklist_identifier

Create an identifier that is blocked from accessing an instance

Example Usage

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

Parameters

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.

Response

models.BlocklistIdentifier

Errors

Error Type Status Code Content Type
models.ClerkErrors 400, 402, 422 application/json
models.SDKError 4XX, 5XX */*

delete_blocklist_identifier

Delete an identifier from the instance block-list

Example Usage

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

Parameters

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.

Response

models.DeletedObject

Errors

Error Type Status Code Content Type
models.ClerkErrors 402, 404 application/json
models.SDKError 4XX, 5XX */*