Skip to content

Latest commit

 

History

History
191 lines (119 loc) · 7.69 KB

File metadata and controls

191 lines (119 loc) · 7.69 KB

AllowlistBlocklist

(allowlistBlocklist)

Overview

Available Operations

listAllowlistIdentifiers

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;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build();



$response = $sdk->allowlistBlocklist->listAllowlistIdentifiers(

);

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

Response

?Operations\ListAllowlistIdentifiersResponse

Errors

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

createAllowlistIdentifier

Create an identifier allowed to sign up to an instance

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;
use Clerk\Backend\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build();

$request = new Operations\CreateAllowlistIdentifierRequestBody(
    identifier: '<value>',
);

$response = $sdk->allowlistBlocklist->createAllowlistIdentifier(
    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\ClerkErrors46 400, 402, 422 application/json
Errors\SDKException 4XX, 5XX */*

createBlocklistIdentifier

Create an identifier that is blocked from accessing an instance

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;
use Clerk\Backend\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build();

$request = new Operations\CreateBlocklistIdentifierRequestBody(
    identifier: '<value>',
);

$response = $sdk->allowlistBlocklist->createBlocklistIdentifier(
    request: $request
);

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

Parameters

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

Response

?Operations\CreateBlocklistIdentifierResponse

Errors

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

deleteBlocklistIdentifier

Delete an identifier from the instance block-list

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build();



$response = $sdk->allowlistBlocklist->deleteBlocklistIdentifier(
    identifierId: '<id>'
);

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

Parameters

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

Response

?Operations\DeleteBlocklistIdentifierResponse

Errors

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