(redirectUrls)
Create a redirect URL
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
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\CreateRedirectURLRequestBody | ✔️ | The request object to use for the request. |
?Operations\CreateRedirectURLResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors89 | 400, 422 | application/json |
Errors\SDKException | 4XX, 5XX | */* |
Retrieve the details of the redirect URL with the given ID
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
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
string | ✔️ | The ID of the redirect URL |
?Operations\GetRedirectURLResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors90 | 404 | application/json |
Errors\SDKException | 4XX, 5XX | */* |
Remove the selected redirect URL from the whitelist of the instance
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
}
Parameter | Type | Required | Description |
---|---|---|---|
id |
string | ✔️ | The ID of the redirect URL |
?Operations\DeleteRedirectURLResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors91 | 404 | application/json |
Errors\SDKException | 4XX, 5XX | */* |