Skip to content

Latest commit

 

History

History
113 lines (72 loc) · 5.55 KB

File metadata and controls

113 lines (72 loc) · 5.55 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();

// handle response

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.Operations;
using Clerk.BackendAPI.Models.Components;

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

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

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.Operations;
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 */*