PHPackages                             seamapi/seam - 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. seamapi/seam

ActiveLibrary[API Development](/categories/api)

seamapi/seam
============

v3.5.0(2w ago)5152.5k↑317.9%5[3 issues](https://github.com/seamapi/php/issues)PHPCI passing

Since Nov 8Pushed 3w ago3 watchersCompare

[ Source](https://github.com/seamapi/php)[ Packagist](https://packagist.org/packages/seamapi/seam)[ RSS](/packages/seamapi-seam/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (12)Versions (187)Used By (0)

Seam PHP SDK
============

[](#seam-php-sdk)

Control locks, lights and other internet of things devices with Seam's simple API.

Check out [the documentation](https://docs.seam.co) or the usage below.

Usage
-----

[](#usage)

```
$seam = new Seam\SeamClient("YOUR_API_KEY");

# Create a Connect Webview to login to a provider
$connect_webview = $seam->connect_webviews->create(
    accepted_providers: ["august"]
);

print "Please Login at this url: " . $connect_webview->url;

# Poll until connect webview is completed
while (true) {
    $connect_webview = $seam->connect_webviews->get(
        $connect_webview->connect_webview_id
    );
    if ($connect_webview->status == "authorized") {
        break;
    } else {
        sleep(1);
    }
}

$connected_account = $seam->connected_accounts->get(
    $connect_webview->connected_account_id
);

print "Looks like you connected with " .
    json_encode($connected_account->user_identifier);

$devices = $seam->devices->list(
    connected_account_id: $connected_account->connected_account_id
);

print "You have " . count($devices) . " devices";

$device_id = $devices[0]->device_id;

# Lock a Door
$seam->locks->lock_door($device_id);

$updated_device = $seam->devices->get($device_id);
$updated_device->properties->locked; // true

# Unlock a Door
$seam->locks->unlock_door($device_id);
$updated_device->properties->locked; // false

# Create an access code on a device
$access_code = $seam->access_codes->create(
    device_id: $device_id,
    code: "1234",
    name: "Test Code"
);

# Check the status of an access code
$access_code->status; // 'setting' (it will go to 'set' when active on the device)

$seam->access_codes->delete($access_code->access_code_id);
```

### Pagination

[](#pagination)

Some Seam API endpoints that return lists of resources support pagination. Use the `Paginator` class to fetch and process resources across multiple pages.

#### Manually fetch pages with the next\_page\_cursor

[](#manually-fetch-pages-with-the-next_page_cursor)

```
$pages = $seam->createPaginator(
    fn($params) => $seam->connected_accounts->list(...$params),
    ["limit" => 2]
);

[$connectedAccounts, $pagination] = $pages->firstPage();

if ($pagination->has_next_page) {
    [$moreConnectedAccounts] = $pages->nextPage($pagination->next_page_cursor);
}
```

#### Resume pagination

[](#resume-pagination)

Get the first page on initial load:

```
$params = ["limit" => 20];

$pages = $seam->createPaginator(
    fn($p) => $seam->connected_accounts->list(...$p),
    $params
);

[$connectedAccounts, $pagination] = $pages->firstPage();

// Store pagination state for later use
file_put_contents(
    "/tmp/seam_connected_accounts_list.json",
    json_encode([$params, $pagination])
);
```

Get the next page at a later time:

```
$stored_data = json_decode(
    file_get_contents("/tmp/seam_connected_accounts_list.json") ?: "[]",
    false
);

$params = $stored_data[0] ?? [];
$pagination =
    $stored_data[1] ??
    (object) ["has_next_page" => false, "next_page_cursor" => null];

if ($pagination->has_next_page) {
    $pages = $seam->createPaginator(
        fn($p) => $seam->connected_accounts->list(...$p),
        $params
    );
    [$moreConnectedAccounts] = $pages->nextPage($pagination->next_page_cursor);
}
```

#### Iterate over all resources

[](#iterate-over-all-resources)

```
$pages = $seam->createPaginator(
    fn($p) => $seam->connected_accounts->list(...$p),
    ["limit" => 20]
);

foreach ($pages->flatten() as $connectedAccount) {
    print $connectedAccount->account_type_display_name . "\n";
}
```

#### Return all resources across all pages as an array

[](#return-all-resources-across-all-pages-as-an-array)

```
$pages = $seam->createPaginator(
    fn($p) => $seam->connected_accounts->list(...$p),
    ["limit" => 20]
);

$connectedAccounts = $pages->flattenToArray();
```

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

[](#installation)

To install the latest version of the automatically generated SDK, run:

`composer require seamapi/seam`

If you want to install our previous handwritten version, run:

`composer require seamapi/seam:1.1`

Development Setup
-----------------

[](#development-setup)

1. Run `yarn install` to get prettier installed for formatting
2. Install [composer](https://getcomposer.org/).
3. Run `composer install` in this directory
4. Run `composer exec phpunit tests`

> To run a specific test file, do `composer exec phpunit tests/MyTest.php`

### Running Tests

[](#running-tests)

You'll need to export `SEAM_API_KEY` to a sandbox workspace API key.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 50.3% 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 ~6 days

Total

163

Last Release

20d ago

Major Versions

v1.1.0 → v2.0.02024-01-19

v2.147.0 → v3.0.02026-07-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2afb8d7310fc0f120a33d96a0c06755ec0eba25b90a17d4a9cd58a594f87f1e?d=identicon)[seveibar](/maintainers/seveibar)

---

Top Contributors

[![seambot](https://avatars.githubusercontent.com/u/76183347?v=4)](https://github.com/seambot "seambot (283 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (138 commits)")[![andrii-balitskyi](https://avatars.githubusercontent.com/u/84702959?v=4)](https://github.com/andrii-balitskyi "andrii-balitskyi (56 commits)")[![seveibar](https://avatars.githubusercontent.com/u/1910070?v=4)](https://github.com/seveibar "seveibar (37 commits)")[![rchodava](https://avatars.githubusercontent.com/u/5033397?v=4)](https://github.com/rchodava "rchodava (22 commits)")[![razor-x](https://avatars.githubusercontent.com/u/721372?v=4)](https://github.com/razor-x "razor-x (12 commits)")[![itelo](https://avatars.githubusercontent.com/u/11433064?v=4)](https://github.com/itelo "itelo (3 commits)")[![sybohy](https://avatars.githubusercontent.com/u/852751?v=4)](https://github.com/sybohy "sybohy (2 commits)")[![codetheweb](https://avatars.githubusercontent.com/u/7410405?v=4)](https://github.com/codetheweb "codetheweb (2 commits)")[![DaniTulp](https://avatars.githubusercontent.com/u/18421761?v=4)](https://github.com/DaniTulp "DaniTulp (2 commits)")[![dawnho](https://avatars.githubusercontent.com/u/1843707?v=4)](https://github.com/dawnho "dawnho (2 commits)")[![klaco-smartbnb](https://avatars.githubusercontent.com/u/97881702?v=4)](https://github.com/klaco-smartbnb "klaco-smartbnb (2 commits)")[![panzerchris](https://avatars.githubusercontent.com/u/7239518?v=4)](https://github.com/panzerchris "panzerchris (1 commits)")[![abimaelmartell](https://avatars.githubusercontent.com/u/1450169?v=4)](https://github.com/abimaelmartell "abimaelmartell (1 commits)")

---

Tags

maintained

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/seamapi-seam/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k54](/packages/neuron-core-neuron-ai)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)[volcengine/volcengine-php-sdk

119.5k](/packages/volcengine-volcengine-php-sdk)

PHPackages © 2026

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