Modify the settings of your instance.
- get - Fetch the current instance
- update - Update instance settings
- updateRestrictions - Update instance restrictions
- getOAuthApplicationSettings - Get OAuth application settings
- updateOAuthApplicationSettings - Update OAuth application settings
- changeDomain - Update production instance domain
- updateOrganizationSettings - Update instance organization settings
- getInstanceProtect - Get instance protect settings
- updateInstanceProtect - Update instance protect settings
Fetches the current instance
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->instanceSettings->get(
);
if ($response->instance !== null) {
// handle response
}?Operations\GetInstanceResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\SDKException | 4XX, 5XX | */* |
Updates the settings of an instance
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->instanceSettings->update(
request: $request
);
if ($response->statusCode === 200) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\UpdateInstanceRequestBody | ✔️ | The request object to use for the request. |
?Operations\UpdateInstanceResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ClerkErrors | 422 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Updates the restriction settings of an instance
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->instanceSettings->updateRestrictions(
request: $request
);
if ($response->instanceRestrictions !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\UpdateInstanceRestrictionsRequestBody | ✔️ | The request object to use for the request. |
?Operations\UpdateInstanceRestrictionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ClerkErrors | 402, 422 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Retrieves the settings for OAuth applications for the instance (dynamic client registration, JWT access tokens, etc.).
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->instanceSettings->getOAuthApplicationSettings(
);
if ($response->oAuthApplicationSettings !== null) {
// handle response
}?Operations\GetInstanceOAuthApplicationSettingsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\SDKException | 4XX, 5XX | */* |
Updates the OAuth application settings for 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->instanceSettings->updateOAuthApplicationSettings(
request: $request
);
if ($response->oAuthApplicationSettings !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\UpdateInstanceOAuthApplicationSettingsRequestBody | ✔️ | The request object to use for the request. |
?Operations\UpdateInstanceOAuthApplicationSettingsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ClerkErrors | 422 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Change the domain of a production instance.
Changing the domain requires updating the DNS records accordingly, deploying new SSL certificates, updating your Social Connection's redirect URLs and setting the new keys in your code.
WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->instanceSettings->changeDomain(
request: $request
);
if ($response->statusCode === 200) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\ChangeProductionInstanceDomainRequestBody | ✔️ | The request object to use for the request. |
?Operations\ChangeProductionInstanceDomainResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ClerkErrors | 400, 422 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Updates the organization settings 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->instanceSettings->updateOrganizationSettings(
request: $request
);
if ($response->organizationSettings !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\UpdateInstanceOrganizationSettingsRequestBody | ✔️ | The request object to use for the request. |
?Operations\UpdateInstanceOrganizationSettingsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ClerkErrors | 400, 402, 404, 422 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get instance protect settings
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->instanceSettings->getInstanceProtect(
);
if ($response->instanceProtect !== null) {
// handle response
}?Operations\GetInstanceProtectResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\SDKException | 4XX, 5XX | */* |
Update instance protect settings
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->instanceSettings->updateInstanceProtect(
request: $request
);
if ($response->instanceProtect !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\UpdateInstanceProtectRequestBody | ✔️ | The request object to use for the request. |
?Operations\UpdateInstanceProtectResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ClerkErrors | 422 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |