PHPackages                             dakkusingh/oktasdk - 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. [API Development](/categories/api)
4. /
5. dakkusingh/oktasdk

ActiveLibrary[API Development](/categories/api)

dakkusingh/oktasdk
==================

PHP client library for the Okta API (v1)

1.2.12(7y ago)097.2k↓50%6[2 PRs](https://github.com/dakkusingh/oktasdk-php/pulls)MITPHPPHP &gt;=5.5.0

Since Mar 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dakkusingh/oktasdk-php)[ Packagist](https://packagist.org/packages/dakkusingh/oktasdk)[ RSS](/packages/dakkusingh-oktasdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (22)Used By (0)

OktaSDK-PHP
===========

[](#oktasdk-php)

[![Latest Stable Version](https://camo.githubusercontent.com/2798c642837dca2dbcd05bea73c1bf65a570f46cbe77bb253a50f3d81172f742/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616b6b7573696e67682f6f6b746173646b2e737667)](https://packagist.org/packages/dakkusingh/oktasdk)[![Total Downloads](https://camo.githubusercontent.com/3902a7308a3e642b170ed4f28b7e1ff3fb82df3248c9a8e7818273f45653172c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616b6b7573696e67682f6f6b746173646b2e737667)](https://packagist.org/packages/dakkusingh/oktasdk)[![License](https://camo.githubusercontent.com/62af71b3e44c35b2e8d7e9fab7b34785a18fb4640d9ed866ed72456308691437/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64616b6b7573696e67682f6f6b746173646b2e737667)](https://packagist.org/packages/dakkusingh/oktasdk)[![Build Status](https://camo.githubusercontent.com/9a249663a7508c2ee5d9253ac7d1c376b9fba5502ecf59122479d069d6b1adaf/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64616b6b7573696e67682f6f6b746173646b2d7068702e737667)](https://travis-ci.org/dakkusingh/oktasdk-php)

PHP client library for the Okta API (v1)

Refer to the full [Okta API documentation](http://developer.okta.com/docs/api)for more complete information on each resource/component.

Install with Composer
---------------------

[](#install-with-composer)

```
composer require dakkusingh/oktasdk
```

Initializing the Client
-----------------------

[](#initializing-the-client)

To initialize the client object you must pass in your Okta organization subdomain and API key as parameters. For example, if your Okta domain is `https://foo.okta.com`, your org prefix is `foo`. For instructions on how to get an API key for your organization, see [Obtaining a token](http://developer.okta.com/docs/api/getting_started/getting_a_token.html).

#### Example:

[](#example)

```
use Okta;

$okta = new Okta\Client('foo', 'api_key');
```

You may also optionally pass an array of config options as the third argument:

```
$okta = new Okta\Client('foo', 'api_key', [
    'bootstrap' => false, // Don't auto-bootstrap the Okta resource properties
    'preview'   => true,  // Use the okta preview (oktapreview.com) domain
    'headers'   => [
        'Some-Header'    => 'Some value',
        'Another-Header' => 'Another value'
    ]
]);
```

Usage
-----

[](#usage)

All Okta resources are available via the `$okta->$resource->$method` syntax where `$resource` is the lower case, singular name of the resource (i.e. - Users = `user`, Groups = `group`, etc.) and `$method` is the method name (see the docs for all available methods). The only exception being the Authentication resource for which the method name is `auth` (because `authentication` is just too long).

#### Example:

[](#example-1)

```
// Get a user by ID
$user = $okta->user->get('jpinkerton');

// Add user to a group
$group = $okta->group->addUser($someGroupId, $user->id);

// Get a user's apps
$userApps = $okta->user->apps($user->id);
```

Handling Exceptions
-------------------

[](#handling-exceptions)

```
use Okta;

try {
    $user = $okta->user->get('jpinkerton');
} catch (Okta\Exception as $e) {
    return $e->getErrorSummary();
}
```

See documentation for available exception methods.

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

[](#contributing)

1. Fork [the repository](https://github.com/dakkusingh/oktasdk-php)
2. Clone your fork:

    ```
    git clone git@github.com:your-username/oktasdk-php.git
    # NOTE: Be sure to use your fork's repository URL
    ```
3. In your local copy, create a branch:

    ```
    git checkout -b descriptive-branch-name'
    ```
4. Make your changes
5. Commit your changes:

    ```
    git commit -m "Your commit notes here"
    # NOTE: Be descriptive with your commit notes
    ```
6. Push your branch:

    ```
    git push origin descriptive-branch-name
    ```
7. [Open a Pull Request](https://github.com/dakkusingh/oktasdk-php/pull/new)on GitHub.

Copyright
---------

[](#copyright)

This project is liscensed under the [MIT License](https://github.com/dakkusingh/oktasdk-php/blob/master/LICENSE).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96.6% 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 ~45 days

Recently: every ~168 days

Total

21

Last Release

2799d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28a9cc9807a119d34d2717c0d0143d6229615682d3cf644f33a40a5289e88887?d=identicon)[dakkusingh](/maintainers/dakkusingh)

---

Top Contributors

[![PHLAK](https://avatars.githubusercontent.com/u/53531?v=4)](https://github.com/PHLAK "PHLAK (114 commits)")[![dakkusingh](https://avatars.githubusercontent.com/u/1692872?v=4)](https://github.com/dakkusingh "dakkusingh (2 commits)")[![a-sansom](https://avatars.githubusercontent.com/u/592735?v=4)](https://github.com/a-sansom "a-sansom (1 commits)")[![ironiclensflare](https://avatars.githubusercontent.com/u/1622893?v=4)](https://github.com/ironiclensflare "ironiclensflare (1 commits)")

---

Tags

apisdkokta

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dakkusingh-oktasdk/health.svg)

```
[![Health](https://phpackages.com/badges/dakkusingh-oktasdk/health.svg)](https://phpackages.com/packages/dakkusingh-oktasdk)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)

PHPackages © 2026

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