BlocklistIdentifiersSDK
(blocklist_identifiers)
- list - List all identifiers on the block-list
- create - Add identifier to the block-list
- delete - Delete identifier from block-list
Get a list of all identifiers which are not allowed to access an instance
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.blocklist_identifiers.list()
assert res is not None
# Handle response
print(res)
Parameter |
Type |
Required |
Description |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.BlocklistIdentifiers
Error Type |
Status Code |
Content Type |
models.ClerkErrors |
401, 402 |
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 clerk:
res = clerk.blocklist_identifiers.create(request={
"identifier": "[email protected]",
})
assert res is not None
# Handle response
print(res)
models.BlocklistIdentifier
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 clerk:
res = clerk.blocklist_identifiers.delete(identifier_id="identifier123")
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 block-list |
identifier123 |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.DeletedObject
Error Type |
Status Code |
Content Type |
models.ClerkErrors |
402, 404 |
application/json |
models.SDKError |
4XX, 5XX |
*/* |