Skip to content

Latest commit

 

History

History
146 lines (90 loc) · 4.63 KB

File metadata and controls

146 lines (90 loc) · 4.63 KB

ClerkBackendRedirectUrls

(redirectUrls)

Overview

Available Operations

  • create - Create a redirect URL
  • get - Retrieve a redirect URL
  • delete - Delete a redirect URL

create

Create a redirect URL

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\CreateRedirectURLRequestBody();

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

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

Parameters

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

Response

?Operations\CreateRedirectURLResponse

Errors

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

get

Retrieve the details of the redirect URL with the given ID

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->redirectUrls->get(
    id: '<id>'
);

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

Parameters

Parameter Type Required Description
id string ✔️ The ID of the redirect URL

Response

?Operations\GetRedirectURLResponse

Errors

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

delete

Remove the selected redirect URL from the whitelist of the 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->redirectUrls->delete(
    id: '<id>'
);

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

Parameters

Parameter Type Required Description
id string ✔️ The ID of the redirect URL

Response

?Operations\DeleteRedirectURLResponse

Errors

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