(redirectUrls)
Create a redirect URL
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
use Clerk\Backend\Models\Operations;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->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\ClerkErrors | 400, 422 | 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;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->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\ClerkErrors | 404 | 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;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->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\ClerkErrors | 404 | application/json |
Errors\SDKException | 4XX, 5XX | */* |