PHPackages                             asika/clerk-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. asika/clerk-php-sdk

AbandonedLibrary

asika/clerk-php-sdk
===================

A fork of Clerk PHP SDK to publish to composer.

v0.1.4(1y ago)020MITPHPPHP ^8.2

Since Nov 1Pushed 1y agoCompare

[ Source](https://github.com/asika32764/clerk-sdk-php)[ Packagist](https://packagist.org/packages/asika/clerk-php-sdk)[ RSS](/packages/asika-clerk-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (6)Used By (0)

 [   ![](https://camo.githubusercontent.com/1754a55e40ccc6966f6e5a0a54358feb4b5fbea9bf680c123df60857a7e9e1c8/68747470733a2f2f696d616765732e636c65726b2e636f6d2f7374617469632f6c6f676f2d6c696768742d6d6f64652d343030783430302e706e67)  ](https://clerk.com?utm_source=github&utm_medium=clerk-backend-php)

clerkinc/backend-php
====================

[](#clerkincbackend-php)

[![Chat on Discord](https://camo.githubusercontent.com/3447d2d3ac352c7959f052b5ea29b23984254d1d79b4cc7efc5369cbcb7bd9f4/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3835363937313636373339333630393735392e7376673f6c6f676f3d646973636f7264)](https://clerk.com/discord)[![Clerk documentation](https://camo.githubusercontent.com/f148854f4e89c3fc4b9308794a0a0fde93d5e3b9b7b7b53f15608cc689c83cb4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d636c65726b2d677265656e2e737667)](https://clerk.com/docs?utm_source=github&utm_medium=koa)[![Follow on Twitter](https://camo.githubusercontent.com/c588bdb99ba252b61124c2f84dcf07867d6f33126b6811924aad8ee5d71a17ff/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f436c65726b4465763f7374796c653d736f6369616c)](https://twitter.com/intent/follow?screen_name=ClerkDev)

[Changelog](https://github.com/clerk/backend-php/blob/main/CHANGELOG.md)· [Ask a Question](https://github.com/clerk/backend-php/discussions)

---

Overview
--------

[](#overview)

[Clerk](https://clerk.com?utm_source=github&utm_medium=clerk-backend-php) is the easiest way to add authentication and user management to your application. To gain a better understanding of the Clerk Backend API, refer to the [Backend API](https://clerk.com/docs/reference/backend-api) documentation.

Summary
-------

[](#summary)

Clerk Backend API: The Clerk REST Backend API, meant to be accessed by backend servers.

### Versions

[](#versions)

When the API changes in a way that isn't compatible with older versions, a new version is released. Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview).

Please see  for more information.

More information about the API can be found at

Table of Contents
-----------------

[](#table-of-contents)

- [clerkinc/backend-php](#clerkincbackend-php)
    - [Overview](#overview)
    - [SDK Installation](#sdk-installation)
    - [Usage](#usage)
    - [SDK Example Usage](#sdk-example-usage)
    - [Request Authentication](#request-authentication)
    - [Authentication](#authentication)
    - [Available Resources and Operations](#available-resources-and-operations)
    - [Error Handling](#error-handling)
    - [Server Selection](#server-selection)
- [Development](#development)
    - [Maturity](#maturity)
    - [Support](#support)
    - [Contributing](#contributing)
    - [Security](#security)
    - [License](#license)

SDK Installation
----------------

[](#sdk-installation)

The SDK relies on [Composer](https://getcomposer.org/) to manage its dependencies.

To install the SDK and add it as a dependency to an existing `composer.json` file:

```
composer require "clerkinc/backend-php"
```

Usage
-----

[](#usage)

Retrieve your Backend API key from the [API Keys](https://dashboard.clerk.com/last-active?path=api-keys) screen in your Clerk dashboard and set it as an environment variable in a `.env` file:

```
CLERK_PUBLISHABLE_KEY=pk_*******
CLERK_SECRET_KEY=sk_******
```

SDK Example Usage
-----------------

[](#sdk-example-usage)

### Example

[](#example)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

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

$response = $sdk->emailAddresses->get(
    emailAddressId: ''
);

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

Request Authentication
----------------------

[](#request-authentication)

Use the [authenticateRequest](https://github.com/clerk/clerk-sdk-php/tree/main/src/Helpers/Jwks/AuthenticateRequest.php) method to authenticate a request from your app's frontend (when using a Clerk frontend SDK) to Clerk's Backend API. For example the following utility function checks if the user is effectively signed in:

```
use GuzzleHttp\Psr7\Request;
use Clerk\Backend\Helpers\Jwks\AuthenticateRequestOptions;
use Clerk\Backend\Helpers\Jwks\AuthenticateRequest;
use Clerk\Backend\Helpers\Jwks\RequestState;

class UserAuthentication
{
    public static function isSignedIn(Request $request): bool
    {
        $options = new AuthenticateRequestOptions(
            secretKey: getenv("CLERK_SECRET_KEY"),
            authorizedParties: ["https://example.com"]
        );

        $requestState = AuthenticateRequest::authenticateRequest($request, $options);

        return $requestState.isSignedIn();
    }
}
```

If the request is correctly authenticated, the token's payload is made available in `$requestState->payload`. Otherwise the reason for the token verification failure is given by `requestState->errorReason`.

Authentication
--------------

[](#authentication)

### Per-Client Security Schemes

[](#per-client-security-schemes)

This SDK supports the following security scheme globally:

NameTypeScheme`bearerAuth`httpHTTP BearerTo authenticate with the API the `bearerAuth` parameter must be set when initializing the SDK. For example:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

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

$response = $sdk->miscellaneous->getInterstitial(
    frontendApi: '',
    publishableKey: ''

);

if ($response->statusCode === 200) {
    // handle response
}
```

Available Resources and Operations
----------------------------------

[](#available-resources-and-operations)

Available methods### [actorTokens](docs/sdks/actortokens/README.md)

[](#actortokens)

- [create](docs/sdks/actortokens/README.md#create) - Create actor token
- [revoke](docs/sdks/actortokens/README.md#revoke) - Revoke actor token

### [allowlistBlocklist](docs/sdks/allowlistblocklist/README.md)

[](#allowlistblocklist)

- [createAllowlistIdentifier](docs/sdks/allowlistblocklist/README.md#createallowlistidentifier) - Add identifier to the allow-list
- [createBlocklistIdentifier](docs/sdks/allowlistblocklist/README.md#createblocklistidentifier) - Add identifier to the block-list
- [deleteBlocklistIdentifier](docs/sdks/allowlistblocklist/README.md#deleteblocklistidentifier) - Delete identifier from block-list
- [listAllowlistIdentifiers](docs/sdks/allowlistblocklist/README.md#listallowlistidentifiers) - List all identifiers on the allow-list

### [allowlistIdentifiers](docs/sdks/allowlistidentifiers/README.md)

[](#allowlistidentifiers)

- [delete](docs/sdks/allowlistidentifiers/README.md#delete) - Delete identifier from allow-list

### [betaFeatures](docs/sdks/betafeatures/README.md)

[](#betafeatures)

- [changeProductionInstanceDomain](docs/sdks/betafeatures/README.md#changeproductioninstancedomain) - Update production instance domain
- [updateInstanceSettings](docs/sdks/betafeatures/README.md#updateinstancesettings) - Update instance settings
- [updateDomain](docs/sdks/betafeatures/README.md#updatedomain) - Update production instance domain ⚠️ **Deprecated**

### [blocklistIdentifiers](docs/sdks/blocklistidentifiers/README.md)

[](#blocklistidentifiers)

- [list](docs/sdks/blocklistidentifiers/README.md#list) - List all identifiers on the block-list

### [clients](docs/sdks/clients/README.md)

[](#clients)

- [get](docs/sdks/clients/README.md#get) - Get a client
- [list](docs/sdks/clients/README.md#list) - List all clients ⚠️ **Deprecated**
- [verify](docs/sdks/clients/README.md#verify) - Verify a client

### [domains](docs/sdks/domains/README.md)

[](#domains)

- [add](docs/sdks/domains/README.md#add) - Add a domain
- [delete](docs/sdks/domains/README.md#delete) - Delete a satellite domain
- [list](docs/sdks/domains/README.md#list) - List all instance domains
- [update](docs/sdks/domains/README.md#update) - Update a domain

### [emailAddresses](docs/sdks/emailaddresses/README.md)

[](#emailaddresses)

- [create](docs/sdks/emailaddresses/README.md#create) - Create an email address
- [delete](docs/sdks/emailaddresses/README.md#delete) - Delete an email address
- [get](docs/sdks/emailaddresses/README.md#get) - Retrieve an email address
- [update](docs/sdks/emailaddresses/README.md#update) - Update an email address

### [emailAndSmsTemplates](docs/sdks/emailandsmstemplates/README.md)

[](#emailandsmstemplates)

- [upsert](docs/sdks/emailandsmstemplates/README.md#upsert) - Update a template for a given type and slug ⚠️ **Deprecated**

### [emailSMSTemplates](docs/sdks/emailsmstemplates/README.md)

[](#emailsmstemplates)

- [get](docs/sdks/emailsmstemplates/README.md#get) - Retrieve a template ⚠️ **Deprecated**
- [list](docs/sdks/emailsmstemplates/README.md#list) - List all templates ⚠️ **Deprecated**
- [revert](docs/sdks/emailsmstemplates/README.md#revert) - Revert a template ⚠️ **Deprecated**
- [toggleTemplateDelivery](docs/sdks/emailsmstemplates/README.md#toggletemplatedelivery) - Toggle the delivery by Clerk for a template of a given type and slug ⚠️ **Deprecated**

### [instanceSettings](docs/sdks/instancesettings/README.md)

[](#instancesettings)

- [getInstance](docs/sdks/instancesettings/README.md#getinstance) - Fetch the current instance
- [update](docs/sdks/instancesettings/README.md#update) - Update instance settings
- [updateOrganizationSettings](docs/sdks/instancesettings/README.md#updateorganizationsettings) - Update instance organization settings
- [updateRestrictions](docs/sdks/instancesettings/README.md#updaterestrictions) - Update instance restrictions

### [invitations](docs/sdks/invitations/README.md)

[](#invitations)

- [createBulkInvitations](docs/sdks/invitations/README.md#createbulkinvitations) - Create multiple invitations
- [create](docs/sdks/invitations/README.md#create) - Create an invitation
- [list](docs/sdks/invitations/README.md#list) - List all invitations
- [revoke](docs/sdks/invitations/README.md#revoke) - Revokes an invitation

### [jwks](docs/sdks/jwks/README.md)

[](#jwks)

- [get](docs/sdks/jwks/README.md#get) - Retrieve the JSON Web Key Set of the instance

### [jwtTemplates](docs/sdks/jwttemplates/README.md)

[](#jwttemplates)

- [create](docs/sdks/jwttemplates/README.md#create) - Create a JWT template
- [delete](docs/sdks/jwttemplates/README.md#delete) - Delete a Template
- [get](docs/sdks/jwttemplates/README.md#get) - Retrieve a template
- [list](docs/sdks/jwttemplates/README.md#list) - List all templates
- [update](docs/sdks/jwttemplates/README.md#update) - Update a JWT template

### [miscellaneous](docs/sdks/miscellaneous/README.md)

[](#miscellaneous)

- [getInterstitial](docs/sdks/miscellaneous/README.md#getinterstitial) - Returns the markup for the interstitial page

### [oauthApplications](docs/sdks/oauthapplications/README.md)

[](#oauthapplications)

- [create](docs/sdks/oauthapplications/README.md#create) - Create an OAuth application
- [delete](docs/sdks/oauthapplications/README.md#delete) - Delete an OAuth application
- [get](docs/sdks/oauthapplications/README.md#get) - Retrieve an OAuth application by ID
- [list](docs/sdks/oauthapplications/README.md#list) - Get a list of OAuth applications for an instance
- [rotateSecret](docs/sdks/oauthapplications/README.md#rotatesecret) - Rotate the client secret of the given OAuth application
- [update](docs/sdks/oauthapplications/README.md#update) - Update an OAuth application

### [organizationDomain](docs/sdks/organizationdomain/README.md)

[](#organizationdomain)

- [update](docs/sdks/organizationdomain/README.md#update) - Update an organization domain.

### [organizationDomains](docs/sdks/organizationdomains/README.md)

[](#organizationdomains)

- [create](docs/sdks/organizationdomains/README.md#create) - Create a new organization domain.
- [delete](docs/sdks/organizationdomains/README.md#delete) - Remove a domain from an organization.
- [list](docs/sdks/organizationdomains/README.md#list) - Get a list of all domains of an organization.

### [organizationInvitations](docs/sdks/organizationinvitations/README.md)

[](#organizationinvitations)

- [create](docs/sdks/organizationinvitations/README.md#create) - Create and send an organization invitation
- [bulkCreate](docs/sdks/organizationinvitations/README.md#bulkcreate) - Bulk create and send organization invitations
- [get](docs/sdks/organizationinvitations/README.md#get) - Retrieve an organization invitation by ID
- [getAll](docs/sdks/organizationinvitations/README.md#getall) - Get a list of organization invitations for the current instance
- [list](docs/sdks/organizationinvitations/README.md#list) - Get a list of organization invitations
- [listPending](docs/sdks/organizationinvitations/README.md#listpending) - Get a list of pending organization invitations ⚠️ **Deprecated**
- [revoke](docs/sdks/organizationinvitations/README.md#revoke) - Revoke a pending organization invitation

### [organizationMemberships](docs/sdks/organizationmemberships/README.md)

[](#organizationmemberships)

- [create](docs/sdks/organizationmemberships/README.md#create) - Create a new organization membership
- [delete](docs/sdks/organizationmemberships/README.md#delete) - Remove a member from an organization
- [getAll](docs/sdks/organizationmemberships/README.md#getall) - Get a list of all organization memberships within an instance.
- [list](docs/sdks/organizationmemberships/README.md#list) - Get a list of all members of an organization
- [update](docs/sdks/organizationmemberships/README.md#update) - Update an organization membership
- [updateMetadata](docs/sdks/organizationmemberships/README.md#updatemetadata) - Merge and update organization membership metadata

### [organizations](docs/sdks/organizations/README.md)

[](#organizations)

- [create](docs/sdks/organizations/README.md#create) - Create an organization
- [delete](docs/sdks/organizations/README.md#delete) - Delete an organization
- [deleteLogo](docs/sdks/organizations/README.md#deletelogo) - Delete the organization's logo.
- [get](docs/sdks/organizations/README.md#get) - Retrieve an organization by ID or slug
- [list](docs/sdks/organizations/README.md#list) - Get a list of organizations for an instance
- [mergeMetadata](docs/sdks/organizations/README.md#mergemetadata) - Merge and update metadata for an organization
- [update](docs/sdks/organizations/README.md#update) - Update an organization
- [uploadLogo](docs/sdks/organizations/README.md#uploadlogo) - Upload a logo for the organization

### [phoneNumbers](docs/sdks/phonenumbers/README.md)

[](#phonenumbers)

- [create](docs/sdks/phonenumbers/README.md#create) - Create a phone number
- [delete](docs/sdks/phonenumbers/README.md#delete) - Delete a phone number
- [get](docs/sdks/phonenumbers/README.md#get) - Retrieve a phone number
- [update](docs/sdks/phonenumbers/README.md#update) - Update a phone number

### [proxyChecks](docs/sdks/proxychecks/README.md)

[](#proxychecks)

- [verify](docs/sdks/proxychecks/README.md#verify) - Verify the proxy configuration for your domain

### [redirectUrls](docs/sdks/clerkbackendredirecturls/README.md)

[](#redirecturls)

- [create](docs/sdks/clerkbackendredirecturls/README.md#create) - Create a redirect URL
- [delete](docs/sdks/clerkbackendredirecturls/README.md#delete) - Delete a redirect URL
- [get](docs/sdks/clerkbackendredirecturls/README.md#get) - Retrieve a redirect URL

### [redirectURLs](docs/sdks/redirecturls/README.md)

[](#redirecturls-1)

- [list](docs/sdks/redirecturls/README.md#list) - List all redirect URLs

### [samlConnections](docs/sdks/samlconnections/README.md)

[](#samlconnections)

- [create](docs/sdks/samlconnections/README.md#create) - Create a SAML Connection
- [delete](docs/sdks/samlconnections/README.md#delete) - Delete a SAML Connection
- [get](docs/sdks/samlconnections/README.md#get) - Retrieve a SAML Connection by ID
- [list](docs/sdks/samlconnections/README.md#list) - Get a list of SAML Connections for an instance
- [update](docs/sdks/samlconnections/README.md#update) - Update a SAML Connection

### [sessions](docs/sdks/sessions/README.md)

[](#sessions)

- [createSessionToken](docs/sdks/sessions/README.md#createsessiontoken) - Create a session token
- [createTokenFromTemplate](docs/sdks/sessions/README.md#createtokenfromtemplate) - Create a session token from a jwt template
- [get](docs/sdks/sessions/README.md#get) - Retrieve a session
- [list](docs/sdks/sessions/README.md#list) - List all sessions
- [revoke](docs/sdks/sessions/README.md#revoke) - Revoke a session
- [verify](docs/sdks/sessions/README.md#verify) - Verify a session ⚠️ **Deprecated**
- [createSession](docs/sdks/sessions/README.md#createsession) - Create a new active session

### [signInTokens](docs/sdks/signintokens/README.md)

[](#signintokens)

- [create](docs/sdks/signintokens/README.md#create) - Create sign-in token
- [revoke](docs/sdks/signintokens/README.md#revoke) - Revoke the given sign-in token

### [signUps](docs/sdks/signups/README.md)

[](#signups)

- [update](docs/sdks/signups/README.md#update) - Update a sign-up

### [templates](docs/sdks/templates/README.md)

[](#templates)

- [preview](docs/sdks/templates/README.md#preview) - Preview changes to a template ⚠️ **Deprecated**

### [testingTokens](docs/sdks/testingtokens/README.md)

[](#testingtokens)

- [create](docs/sdks/testingtokens/README.md#create) - Retrieve a new testing token

### [users](docs/sdks/users/README.md)

[](#users)

- [ban](docs/sdks/users/README.md#ban) - Ban a user
- [create](docs/sdks/users/README.md#create) - Create a new user
- [createTOTP](docs/sdks/users/README.md#createtotp) - Create a TOTP for a user
- [deleteBackupCodes](docs/sdks/users/README.md#deletebackupcodes) - Disable all user's Backup codes
- [deleteExternalAccount](docs/sdks/users/README.md#deleteexternalaccount) - Delete External Account
- [deleteTotp](docs/sdks/users/README.md#deletetotp) - Delete all the user's TOTPs
- [delete](docs/sdks/users/README.md#delete) - Delete a user
- [deleteProfileImage](docs/sdks/users/README.md#deleteprofileimage) - Delete user profile image
- [disableMFA](docs/sdks/users/README.md#disablemfa) - Disable a user's MFA methods
- [getOAuthAccessToken](docs/sdks/users/README.md#getoauthaccesstoken) - Retrieve the OAuth access token of a user
- [get](docs/sdks/users/README.md#get) - Retrieve a user
- [list](docs/sdks/users/README.md#list) - List all users
- [count](docs/sdks/users/README.md#count) - Count users
- [lock](docs/sdks/users/README.md#lock) - Lock a user
- [setProfileImage](docs/sdks/users/README.md#setprofileimage) - Set user profile image
- [unban](docs/sdks/users/README.md#unban) - Unban a user
- [unlock](docs/sdks/users/README.md#unlock) - Unlock a user
- [update](docs/sdks/users/README.md#update) - Update a user
- [updateMetadata](docs/sdks/users/README.md#updatemetadata) - Merge and update a user's metadata
- [deletePasskey](docs/sdks/users/README.md#deletepasskey) - Delete a user passkey
- [deleteWeb3Wallet](docs/sdks/users/README.md#deleteweb3wallet) - Delete a user web3 wallet
- [getOrganizationInvitations](docs/sdks/users/README.md#getorganizationinvitations) - Retrieve all invitations for a user
- [getOrganizationMemberships](docs/sdks/users/README.md#getorganizationmemberships) - Retrieve all memberships for a user
- [verifyPassword](docs/sdks/users/README.md#verifypassword) - Verify the password of a user
- [verifyTOTP](docs/sdks/users/README.md#verifytotp) - Verify a TOTP or backup code for a user

### [waitlistEntries](docs/sdks/waitlistentries/README.md)

[](#waitlistentries)

- [createWaitlistEntry](docs/sdks/waitlistentries/README.md#createwaitlistentry) - Create a waitlist entry
- [listWaitlistEntries](docs/sdks/waitlistentries/README.md#listwaitlistentries) - List all waitlist entries

### [webhooks](docs/sdks/webhooks/README.md)

[](#webhooks)

- [createSvixApp](docs/sdks/webhooks/README.md#createsvixapp) - Create a Svix app
- [deleteSvixApp](docs/sdks/webhooks/README.md#deletesvixapp) - Delete a Svix app
- [generateSvixAuthURL](docs/sdks/webhooks/README.md#generatesvixauthurl) - Create a Svix Dashboard URL

Error Handling
--------------

[](#error-handling)

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default an API error will raise a `Errors\SDKException` exception, which has the following properties:

PropertyTypeDescription`$message`*string*The error message`$statusCode`*int*The HTTP status code`$rawResponse`*?\\Psr\\Http\\Message\\ResponseInterface*The raw HTTP response`$body`*string*The response contentWhen custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get` method throws the following exceptions:

Error TypeStatus CodeContent TypeErrors\\ClerkErrors400, 401, 404application/jsonErrors\\SDKException4XX, 5XX\*/\*### Example

[](#example-1)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

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

try {
    $response = $sdk->clients->get(
        clientId: ''
    );

    if ($response->client !== null) {
        // handle response
    }
} catch (Errors\ClerkErrorsThrowable $e) {
    // handle $e->$container data
    throw $e;
} catch (Errors\SDKException $e) {
    // handle default exception
    throw $e;
}
```

Server Selection
----------------

[](#server-selection)

### Override Server URL Per-Client

[](#override-server-url-per-client)

The default server can also be overridden globally using the `setServerUrl(string $serverUrl)` builder method when initializing the SDK client instance. For example:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setServerURL('https://api.clerk.com/v1')
    ->build();

$response = $sdk->miscellaneous->getInterstitial(
    frontendApi: '',
    publishableKey: ''

);

if ($response->statusCode === 200) {
    // handle response
}
```

Development
===========

[](#development)

Maturity
--------

[](#maturity)

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Support
-------

[](#support)

You can get in touch with us in any of the following ways:

- Join the official community [Clerk Discord server](https://clerk.com/discord)
- Create a [GitHub Discussion](https://github.com/clerk/backend-php/discussions)
- Contact options listed on [Clerk Support page](https://clerk.com/support?utm_source=github&utm_medium=clerk-backend-php)

Contributing
------------

[](#contributing)

We're open to all community contributions!

Security
--------

[](#security)

`clerkinc/backend-php` follows good practices of security, but 100% security cannot be assured.

`clerkinc/backend-php` is provided **"as is"** without any **warranty**. Use at your own risk.

*For more information and to report security issues, please refer to the [security documentation](https://github.com/clerk/backend-php/blob/main/docs/SECURITY.md).*

License
-------

[](#license)

This project is licensed under the **MIT license**.

See [LICENSE](https://github.com/clerk/backend-php/blob/main/LICENSE) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance42

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

467d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639206?v=4)[Simon Asika](/maintainers/asika32764)[@asika32764](https://github.com/asika32764)

---

Top Contributors

[![octoper](https://avatars.githubusercontent.com/u/6823226?v=4)](https://github.com/octoper "octoper (20 commits)")[![2ynn](https://avatars.githubusercontent.com/u/41802320?v=4)](https://github.com/2ynn "2ynn (3 commits)")[![asika32764](https://avatars.githubusercontent.com/u/1639206?v=4)](https://github.com/asika32764 "asika32764 (3 commits)")[![idbentley](https://avatars.githubusercontent.com/u/403209?v=4)](https://github.com/idbentley "idbentley (2 commits)")[![speakeasybot](https://avatars.githubusercontent.com/u/108416695?v=4)](https://github.com/speakeasybot "speakeasybot (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/asika-clerk-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/asika-clerk-php-sdk/health.svg)](https://phpackages.com/packages/asika-clerk-php-sdk)
```

###  Alternatives

[clerkinc/backend-php

2755.0k](/packages/clerkinc-backend-php)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M673](/packages/laravel-socialite)[polar-sh/sdk

4014.5k4](/packages/polar-sh-sdk)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[hoels/app-store-server-library-php

The PHP server library for the App Store Server API and App Store Server Notifications.

44162.2k](/packages/hoels-app-store-server-library-php)[exinone/mixin-sdk-php

Mixin-Network SDK for PHP, modify from ExinOne/laravel-mixin-sdk

242.5k4](/packages/exinone-mixin-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
