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

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

spydertext/php-sdk
==================

SpyderText PHP SDK

07PHP

Since Oct 31Pushed 8y agoCompare

[ Source](https://github.com/siosphere/php-spydertext-sdk)[ Packagist](https://packagist.org/packages/spydertext/php-sdk)[ RSS](/packages/spydertext-php-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

SpyderText PHP SDK
==================

[](#spydertext-php-sdk)

The SpyderText PHP Sdk is currently in Beta, and only a few of the SDKs have been built out. This library will continually be updated as we add support for the additional APIs SpyderText offers.

Getting Started
---------------

[](#getting-started)

With composer simply do a:

```
composer require spydertext/php-sdk "dev-master"

```

Full documentation can be found:

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

[](#authentication)

You will need to generate a Device Token using the SDK that all other API calls will use. This token should be saved in a database, an environment variable, or placed with your other secrets.

```
use SpyderText\SpyderText;

SpyderText::setApiKey("YOUR_API_KEY_HERE");

$deviceToken = SpyderText::Authentication()->createDeviceToken();
//store on disk, or in the database for usage for all other API calls
file_put_contents('./.deviceToken', $deviceToken['device_id']);

echo $deviceToken;
```

Account SDK
-----------

[](#account-sdk)

Examples are locatd in the examples/account directory, credentials should be placed in the examples/common.php

### Get Account Collection

[](#get-account-collection)

```
use SpyderText\SpyderText;

SpyderText::setApiKey(API_KEY);
SpyderText::setDeviceToken(DEVICE_TOKEN);

$collection = SpyderText::Account()->collection([]);

/*
test searching by query
$collection = SpyderText::Account()->collection([
    'q' => 'test'
]);
*/

//will automatically continue looping through and doing API calls for additional pages until it reaches the end
foreach($collection as $account)
{
    echo $account['id'] . "\n";
    echo $account['name'] . "\n\n";
}
```

### Get Account

[](#get-account)

```
use SpyderText\SpyderText;

SpyderText::setApiKey(API_KEY);
SpyderText::setDeviceToken(DEVICE_TOKEN);

//get account by ID
$account = SpyderText::Account()->get(4);
var_dump($account);
```

### Save Account

[](#save-account)

```
use SpyderText\SpyderText;

SpyderText::setApiKey(API_KEY);
//should already have a device token, if not, see authentication/create-device-token.php
SpyderText::setDeviceToken(DEVICE_TOKEN);

$account = SpyderText::Account()->create([
    'name' => 'Jane Doe',
    'email' => 'jane@example.com',
    'mobile_phone' => '15551231234'
]);
```

### Delete Account

[](#delete-account)

```
use SpyderText\SpyderText;

SpyderText::setApiKey(API_KEY);
//should already have a device token, if not, see authentication/create-device-token.php
SpyderText::setDeviceToken(DEVICE_TOKEN);

//delete account by ID
$result = SpyderText::Account()->delete(4);
if($result && $result['success']) {
    echo "Successfully deleted account!\n";
}
```

Program SDK
-----------

[](#program-sdk)

Examples are located in the examples/program directory, credentials should be placed in the examples/common.php

### Get Program Collection

[](#get-program-collection)

```
SpyderText::setApiKey(API_KEY);
SpyderText::setDeviceToken(DEVICE_TOKEN);

$collection = SpyderText::Program()->collection([]);

//will automatically continue looping through and doing API calls for additional pages until it reaches the end
foreach($collection as $program)
{
    echo $program['id'] . "\n";
    echo $program['name'] . "\n\n";
}
```

### Add Participant

[](#add-participant)

```
use SpyderText\SpyderText;

SpyderText::setApiKey(API_KEY);
SpyderText::setDeviceToken(DEVICE_TOKEN);

$programId = 1;
$accountId = 1;

$result = SpyderText::Program()->addParticipant($programId, $accountId);

if(!$result || !$result['success']) {
    echo "Failed to add participant\n";
    exit;
}

echo "Successfully added participant to program\n";
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ea92aa37370c3f24c124136ad9ec85883ee1d3fb38302dcf41d7d47d26bee69?d=identicon)[siosphere](/maintainers/siosphere)

---

Top Contributors

[![siosphere](https://avatars.githubusercontent.com/u/2582612?v=4)](https://github.com/siosphere "siosphere (3 commits)")

### Embed Badge

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

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

###  Alternatives

[andrejsstepanovs/business-days-calculator

Business day calculation

2361.9k](/packages/andrejsstepanovs-business-days-calculator)

PHPackages © 2026

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