Skip to content

Latest commit

 

History

History
134 lines (84 loc) · 6.29 KB

File metadata and controls

134 lines (84 loc) · 6.29 KB

ClerkRedirectUrls

(redirect_urls)

Overview

Available Operations

  • create - Create a redirect URL
  • get - Retrieve a redirect URL
  • delete - Delete a redirect URL

create

Create a redirect URL

Example Usage

from clerk_backend_api import Clerk

s = Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.redirect_urls.create(request={
    "url": "https://my-app.com/oauth-callback",
})

if res is not None:
    # handle response
    pass

Parameters

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.

Response

models.RedirectURL

Errors

Error Object Status Code Content Type
models.ClerkErrors 400,422 application/json
models.SDKError 4xx-5xx /

get

Retrieve the details of the redirect URL with the given ID

Example Usage

from clerk_backend_api import Clerk

s = Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.redirect_urls.get(id="redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3")

if res is not None:
    # handle response
    pass

Parameters

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.

Response

models.RedirectURL

Errors

Error Object Status Code Content Type
models.ClerkErrors 404 application/json
models.SDKError 4xx-5xx /

delete

Remove the selected redirect URL from the whitelist of the instance

Example Usage

from clerk_backend_api import Clerk

s = Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.redirect_urls.delete(id="redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3")

if res is not None:
    # handle response
    pass

Parameters

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.

Response

models.DeletedObject

Errors

Error Object Status Code Content Type
models.ClerkErrors 404 application/json
models.SDKError 4xx-5xx /