PHPackages                             getokta/okta-connect-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. getokta/okta-connect-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

getokta/okta-connect-sdk
========================

Official PHP SDK for Okta Connect — the omnichannel messaging platform (WhatsApp first; SMS / Email to follow).

v0.4.0(4w ago)0590↑100%MITPHPPHP ^8.2

Since May 7Pushed 4w agoCompare

[ Source](https://github.com/getokta/okta-connect-sdk)[ Packagist](https://packagist.org/packages/getokta/okta-connect-sdk)[ RSS](/packages/getokta-okta-connect-sdk/feed)WikiDiscussions main Synced 1w ago

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

Okta Connect PHP SDK
====================

[](#okta-connect-php-sdk)

[![PHP Version](https://camo.githubusercontent.com/c9f64f714c636ba27a3bba6dfd52f98426832db1262747efa54b212d16943651/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c7565)](https://www.php.net/)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)[![Status](https://camo.githubusercontent.com/71cb9a97360b8841ddfc125fa85687761845a6d44b48b4de9b527a2d2dce2930/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d616c7068612d6f72616e6765)](#)

A framework-agnostic PHP client for the **Okta Connect** omnichannel messaging platform. WhatsApp ships first; SMS and email channels follow under the same client surface (`Okta\Connect\\*`). No Laravel dependency in the SDK code itself — a separate `getokta/okta-connect-sdk-laravel` bridge package will be published later.

Installation
------------

[](#installation)

```
composer require getokta/okta-connect-sdk
```

Quickstart
----------

[](#quickstart)

### Tenant scope (read / write / send)

[](#tenant-scope-read--write--send)

```
use Okta\Connect\WhatsApp\Client;

$client = new Client(
    baseUrl: 'https://connect.example.com',
    token: 'sanctum_token_here',
    options: ['timeout' => 30, 'retries' => 2],
);

$client->messages()->send([
    'channel_id' => '01H...',
    'to'         => '+9665...',
    'type'       => 'text',
    'text'       => ['body' => 'Hello'],
]);

$messages      = $client->messages()->list(['conversation_id' => '01H...', 'per_page' => 50]);
$conversations = $client->conversations()->list();
$conversation  = $client->conversations()->get($id);
$contacts      = $client->contacts()->list(['search' => '+966']);
$client->contacts()->upsert(['phone' => '+9665...', 'name' => 'Ali']);
$channels      = $client->channels()->list();
$client->webhooks()->register(['url' => 'https://...', 'events' => ['message.received']]);
```

### Platform-admin scope (`platform.admin` ability)

[](#platform-admin-scope-platformadmin-ability)

```
$client->admin()->workspaces()->create(['name' => 'Acme', 'slug' => 'acme']);
$client->admin()->workspaces()->list(['per_page' => 20]);
$client->admin()->workspaces()->get($ulid);
$client->admin()->workspaces()->update($ulid, ['display_name' => 'Acme Inc']);

$client->admin()->workspaceUsers()->create($workspaceId, [
    'name' => 'Ali', 'email' => 'ali@acme.com', 'password_auto' => true,
]);
$client->admin()->workspaceUsers()->list($workspaceId);

$client->admin()->workspaceTokens()->issue($workspaceId, [
    'name' => 'partner-app',
    'abilities' => ['read', 'send'],
    'user_id' => $userId,
]);

$client->admin()->workspaceChannels()->create($workspaceId, [
    'display_name' => 'Acme Main',
    'type'         => 'whatsapp_cloud',
]);
$client->admin()->workspaceChannels()->list($workspaceId);
```

### Idempotency

[](#idempotency)

Mutating calls accept an optional `Idempotency-Key` header so safe retries are server-deduped:

```
$client->messages()->send($payload, idempotencyKey: 'order-1234-confirmation');
```

Configuration
-------------

[](#configuration)

OptionTypeDefaultDescription`baseUrl``string`*required*Root URL of the Okta Connect API, e.g. `https://connect.example.com`.`token``string`*required*Sanctum personal-access token. Abilities determine which endpoints succeed.`timeout``int``30`Request timeout in seconds.`retries``int``2`Retry budget for 429 + 5xx responses (exponential backoff, base 250 ms).`httpClient``Psr\Http\Client\ClientInterface`GuzzleInject a custom PSR-18 client (testing, alt transports).Error handling
--------------

[](#error-handling)

All non-2xx responses raise typed exceptions extending `Okta\Connect\WhatsApp\Exceptions\WhatsAppException`:

ExceptionHTTPMeaning`AuthenticationException`401Token missing / invalid / expired.`AuthorizationException`403Token lacks the required ability for this endpoint.`NotFoundException`404Resource doesn't exist or is not visible to the caller.`ValidationException`422Request body failed validation. Use `->errors()` to read the field map.`RateLimitException`429Exceeded the per-token rate limit. Use `->retryAfter()` to back off.`ServerException`5xxServer error. SDK will retry per `retries` config before raising.`WhatsAppException`otherBase class — catch-all for unexpected status codes.Each exception exposes `->statusCode()`, `->responseBody()`, and the original PSR-7 response.

Running the tests
-----------------

[](#running-the-tests)

```
composer install
vendor/bin/phpunit
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance94

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

Every ~2 days

Total

3

Last Release

29d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/155090830?v=4)[maldoukhi](/maintainers/maldoukhi)[@maldoukhi](https://github.com/maldoukhi)

---

Top Contributors

[![maldoukhi](https://avatars.githubusercontent.com/u/155090830?v=4)](https://github.com/maldoukhi "maldoukhi (8 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (2 commits)")

---

Tags

sdkmessagingconnectwhatsappoktaomnichannel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/getokta-okta-connect-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/getokta-okta-connect-sdk/health.svg)](https://phpackages.com/packages/getokta-okta-connect-sdk)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k532.1M2.5k](/packages/aws-aws-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.9k496.1k32](/packages/neuron-core-neuron-ai)[civicrm/civicrm-core

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

744284.3k34](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

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