- list - List all redirect URLs
- create - Create a redirect URL
- get - Retrieve a redirect URL
- delete - Delete a redirect URL
Lists all whitelisted redirect_urls for the instance
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.redirect_urls.list(paginated=True, limit=20, offset=10)
# 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. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Create a redirect URL
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.redirect_urls.create(request={
"url": "https://my-app.com/oauth-callback",
})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.CreateRedirectURLRequestBody | ✔️ | 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, 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Retrieve the details of the redirect URL with the given ID
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.redirect_urls.get(id="redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
id |
str | ✔️ | The ID of the redirect URL | redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3 |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ClerkErrors | 404 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Remove the selected redirect URL from the whitelist of the instance
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.redirect_urls.delete(id="redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
id |
str | ✔️ | The ID of the redirect URL | redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3 |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ClerkErrors | 404 | application/json |
| models.SDKError | 4XX, 5XX | */* |