Returns a list of all clients. The clients are returned sorted by creation date, with the newest clients appearing first. Warning: the endpoint is being deprecated and will be removed in future versions.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.GetClientListResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetClientListResponse res = sdk.clients().list()
.limit(10L)
.offset(0L)
.call();
if (res.clientList().isPresent()) {
System.out.println(res.clientList().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
paginated |
Optional<Boolean> | ➖ | Whether to paginate the results. If true, the results will be paginated. If false, the results will not be paginated. |
limit |
Optional<Long> | ➖ | Applies a limit to the number of results returned. Can be used for paginating the results together with offset. |
offset |
Optional<Long> | ➖ | Skip the first offset results when paginating.Needs to be an integer greater or equal to zero. To be used in conjunction with limit. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 400, 401, 410, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Verifies the client in the provided token
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.VerifyClientResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
VerifyClientResponse res = sdk.clients().verify()
.call();
if (res.client().isPresent()) {
System.out.println(res.client().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
VerifyClientRequestBody | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 400, 401, 404 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Returns the details of a client.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.GetClientResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetClientResponse res = sdk.clients().get()
.clientId("<id>")
.call();
if (res.client().isPresent()) {
System.out.println(res.client().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
clientId |
String | ✔️ | Client ID. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 400, 401, 404 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |