(webhooks())
You can configure webhooks to be notified about various events that happen on your instance. https://clerk.com/docs/integration/webhooks
- createSvixApp - Create a Svix app
- deleteSvixApp - Delete a Svix app
- generateSvixAuthURL - Create a Svix Dashboard URL
Create a Svix app and associate it with the current instance
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
}
}
}
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 400 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
Delete a Svix app and disassociate it from the current instance
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
}
}
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 400 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |
Generate a new url for accessing the Svix's management dashboard for that particular instance
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
}
}
}
Error Type | Status Code | Content Type |
---|---|---|
models/errors/ClerkErrors | 400 | application/json |
models/errors/SDKError | 4XX, 5XX | */* |