Skip to content

Latest commit

 

History

History
140 lines (94 loc) · 3.84 KB

README.md

File metadata and controls

140 lines (94 loc) · 3.84 KB

Webhooks

(webhooks())

Overview

You can configure webhooks to be notified about various events that happen on your instance. https://clerk.com/docs/integration/webhooks

Available Operations

createSvixApp

Create a Svix app and associate it with the current instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.CreateSvixAppResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
            .build();

        CreateSvixAppResponse res = sdk.webhooks().createSvixApp()
                .call();

        if (res.svixURL().isPresent()) {
            // handle response
        }
    }
}

Response

CreateSvixAppResponse

Errors

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

deleteSvixApp

Delete a Svix app and disassociate it from the current instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.DeleteSvixAppResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
            .build();

        DeleteSvixAppResponse res = sdk.webhooks().deleteSvixApp()
                .call();

        // handle response
    }
}

Response

DeleteSvixAppResponse

Errors

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

generateSvixAuthURL

Generate a new url for accessing the Svix's management dashboard for that particular instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.GenerateSvixAuthURLResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
            .build();

        GenerateSvixAuthURLResponse res = sdk.webhooks().generateSvixAuthURL()
                .call();

        if (res.svixURL().isPresent()) {
            // handle response
        }
    }
}

Response

GenerateSvixAuthURLResponse

Errors

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