Skip to content

Latest commit

 

History

History
157 lines (102 loc) · 7.95 KB

File metadata and controls

157 lines (102 loc) · 7.95 KB

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

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->allowlistIdentifiers->list(
    limit: 10,
    offset: 0

);

if ($response->allowlistIdentifierList !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
paginated ?bool Whether to paginate the results.
If true, the results will be paginated.
If false, the results will not be paginated.
limit ?int Applies a limit to the number of results returned.
Can be used for paginating the results together with offset.
offset ?int Skip the first offset results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with limit.

Response

?Operations\ListAllowlistIdentifiersResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 401, 402 application/json
Errors\SDKException 4XX, 5XX */*

create

Create an identifier allowed to sign up to an instance

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->allowlistIdentifiers->create(
    request: $request
);

if ($response->allowlistIdentifier !== null) {
    // handle response
}

Parameters

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

Response

?Operations\CreateAllowlistIdentifierResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 400, 402, 422 application/json
Errors\SDKException 4XX, 5XX */*

delete

Delete an identifier from the instance allow-list

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->allowlistIdentifiers->delete(
    identifierId: '<id>'
);

if ($response->deletedObject !== null) {
    // handle response
}

Parameters

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

Response

?Operations\DeleteAllowlistIdentifierResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 402, 404 application/json
Errors\SDKException 4XX, 5XX */*