(Clients)
The Client object tracks sessions, as well as the state of any sign in and sign up attempts, for a given device. https://clerk.com/docs/reference/clerkjs/client
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.
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;
var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Clients.ListAsync(
limit: 20,
offset: 10
);
// handle response
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Limit |
long | ➖ | Applies a limit to the number of results returned. Can be used for paginating the results together with offset . |
20 |
Offset |
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 . |
10 |
Error Type | Status Code | Content Type |
---|---|---|
Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 410, 422 | application/json |
Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | */* |
Verifies the client in the provided token
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;
var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
VerifyClientRequestBody req = new VerifyClientRequestBody() {
Token = "jwt_token_example",
};
var res = await sdk.Clients.VerifyAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
VerifyClientRequestBody | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 404 | application/json |
Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | */* |
Returns the details of a client.
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;
var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Clients.GetAsync(clientId: "cli_123456789");
// handle response
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientId |
string | ✔️ | Client ID. | cli_123456789 |
Error Type | Status Code | Content Type |
---|---|---|
Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 404 | application/json |
Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | */* |