Skip to content

Latest commit

 

History

History
123 lines (80 loc) · 8.99 KB

File metadata and controls

123 lines (80 loc) · 8.99 KB

AllowlistIdentifiers

(AllowlistIdentifiers)

Overview

Available Operations

  • List - List all identifiers on the allow-list
  • Create - Add identifier to the allow-list
  • Delete - Delete identifier from allow-list

List

Get a list of all identifiers allowed to sign up to an instance

Example Usage

using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.AllowlistIdentifiers.ListAsync(
    paginated: false,
    limit: 20,
    offset: 10
);

// handle response

Parameters

Parameter Type Required Description Example
Paginated bool Whether to paginate the results.
If true, the results will be paginated.
If false, the results will not be paginated.
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

Response

ListAllowlistIdentifiersResponse

Errors

Error Type Status Code Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors 401, 402 application/json
Clerk.BackendAPI.Models.Errors.SDKError 4XX, 5XX */*

Create

Create an identifier allowed to sign up to an instance

Example Usage

using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Components;
using Clerk.BackendAPI.Models.Operations;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

CreateAllowlistIdentifierRequestBody req = new CreateAllowlistIdentifierRequestBody() {
    Identifier = "[email protected]",
};

var res = await sdk.AllowlistIdentifiers.CreateAsync(req);

// handle response

Parameters

Parameter Type Required Description
request CreateAllowlistIdentifierRequestBody ✔️ The request object to use for the request.

Response

CreateAllowlistIdentifierResponse

Errors

Error Type Status Code Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors 400, 402, 422 application/json
Clerk.BackendAPI.Models.Errors.SDKError 4XX, 5XX */*

Delete

Delete an identifier from the instance allow-list

Example Usage

using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.AllowlistIdentifiers.DeleteAsync(identifierId: "example_identifier_id");

// handle response

Parameters

Parameter Type Required Description Example
IdentifierId string ✔️ The ID of the identifier to delete from the allow-list example_identifier_id

Response

DeleteAllowlistIdentifierResponse

Errors

Error Type Status Code Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors 402, 404 application/json
Clerk.BackendAPI.Models.Errors.SDKError 4XX, 5XX */*