Skip to content

Latest commit

 

History

History
138 lines (91 loc) · 8.75 KB

README.md

File metadata and controls

138 lines (91 loc) · 8.75 KB

BetaFeatures

(beta_features)

Overview

Available Operations

update_instance_settings

Updates the settings of an instance

Example Usage

from clerk_backend_api import Clerk

with Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:

    res = clerk.beta_features.update_instance_settings(request={
        "restricted_to_allowlist": False,
        "from_email_address": "noreply",
        "progressive_sign_up": True,
        "session_token_template": "defaultSessionToken",
        "enhanced_email_deliverability": True,
        "test_mode": True,
    })

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
request models.UpdateInstanceAuthConfigRequestBody ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.InstanceSettings

Errors

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

update_domain

Change the domain of a production instance.

Changing the domain requires updating the DNS records accordingly, deploying new SSL certificates, updating your Social Connection's redirect URLs and setting the new keys in your code.

WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

from clerk_backend_api import Clerk

with Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:

    clerk.beta_features.update_domain(request={
        "home_url": "https://www.example.com",
    })

    # Use the SDK ...

Parameters

Parameter Type Required Description
request models.UpdateProductionInstanceDomainRequestBody ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Errors

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

change_production_instance_domain

Change the domain of a production instance.

Changing the domain requires updating the DNS records accordingly, deploying new SSL certificates, updating your Social Connection's redirect URLs and setting the new keys in your code.

WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.

Example Usage

from clerk_backend_api import Clerk

with Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:

    clerk.beta_features.change_production_instance_domain(request={
        "home_url": "https://www.newdomain.com",
        "is_secondary": False,
    })

    # Use the SDK ...

Parameters

Parameter Type Required Description
request models.ChangeProductionInstanceDomainRequestBody ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Errors

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