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

ActiveLibrary[API Development](/categories/api)

sdotee/sdk
==========

PHP SDK for S.EE API

v1.3.0(2w ago)08[1 PRs](https://github.com/sdotee/sdk.php/pulls)MITPHPPHP &gt;=8.1CI passing

Since Jul 31Pushed 2w agoCompare

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

READMEChangelogDependencies (2)Versions (3)Used By (0)

S.EE PHP SDK
============

[](#see-php-sdk)

[![CI](https://github.com/sdotee/sdk.php/actions/workflows/ci.yml/badge.svg)](https://github.com/sdotee/sdk.php/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/f9f9d81c3f4241236e3e31deaf608a4f4661dab4c2ee416349548c15382cb5a1/68747470733a2f2f706f7365722e707567782e6f72672f73646f7465652f73646b2f762f737461626c65)](https://packagist.org/packages/sdotee/sdk)[![License](https://camo.githubusercontent.com/f15c08af461ec4f806962c8d1cf91694e25ef33992504d15a3465d8d43895599/68747470733a2f2f706f7365722e707567782e6f72672f73646f7465652f73646b2f6c6963656e7365)](LICENSE)

Official PHP SDK for the [S.EE](https://s.ee) API. It supports short URLs, text sharing, files (including TUS large-file uploads), bio pages, QR codes, tags, usage, and token validation.

Current SDK version: **1.3.0**. The runtime version is available as `See\Client::VERSION`.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Guzzle &gt;= 7.0

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

[](#installation)

Install via Composer:

```
composer require sdotee/sdk
```

or visit:  for more details.

Usage
-----

[](#usage)

### Initialization

[](#initialization)

```
use See\Client;

$apiKey = 'YOUR_API_KEY';
$client = new Client($apiKey);
```

### Short URL

[](#short-url)

**Create a Short URL:**

```
try {
    $result = $client->shortUrl->create('https://example.com/long/url', 's.ee', [
        'custom_slug' => 'myshort',
        'title' => 'My Link'
    ]);

    echo "Short URL: " . $result['short_url'];
} catch (\See\Exception\SeeException $e) {
    echo "Error: " . $e->getMessage();
}
```

**Update a Short URL:**

```
$client->shortUrl->update('s.ee', 'myshort', 'https://new-url.com', 'New Title');
```

**Delete a Short URL:**

```
$client->shortUrl->delete('s.ee', 'myshort');
```

**History and statistics:**

```
$links = $client->shortUrl->getHistory(page: 1);
$stats = $client->shortUrl->getVisitStatistics('s.ee', 'myshort', 'monthly');
$domains = $client->shortUrl->getDomains();

// Query-string integration. JSON mode is enabled by default by the SDK.
$link = $client->shortUrl->createSimple($apiKey, 'https://example.com', [
    'custom_slug' => 'example',
]);
```

### Text Paste

[](#text-paste)

**Create Text Paste:**

```
$result = $client->text->create('Hello World!', [
    'text_type' => 'markdown',
    'title' => 'My Note'
]);
echo $result['short_url'];
```

**Update Text Paste:**

```
$client->text->update('s.ee', 'myslug', 'New Content', 'New Title');
```

**Delete Text Paste:**

```
$client->text->delete('s.ee', 'myslug');
```

```
$texts = $client->text->getHistory(page: 1);
$domains = $client->text->getDomains();
```

### File Service

[](#file-service)

**Upload File:**

```
// Upload from path
$result = $client->file->upload('/path/to/image.png', 'image.png', [
    'domain' => 'fs.to',
    'custom_slug' => 'image',
]);
echo $result['url'];
echo $result['delete'];
```

**Delete File:**

```
$client->file->delete($deleteKey);
```

**History and private files:**

```
$files = $client->file->getHistory(page: 1);
$domains = $client->file->getDomains();
$download = $client->file->getPrivateDownloadUrl($fileId);
```

**Large files (TUS 1.0):**

```
$path = '/path/to/archive.zip';
$upload = $client->file->createLargeUpload(basename($path), filesize($path), [
    'file_hash' => hash_file('sha256', $path),
    'is_private' => 1,
]);

if (!$upload['fast_upload']) {
    $handle = fopen($path, 'rb');
    $offset = $client->file->getLargeUploadOffset($upload['upload_id']);
    fseek($handle, $offset);

    while (!feof($handle)) {
        $chunk = fread($handle, 8 * 1024 * 1024);
        $offset = $client->file->uploadChunk($upload['upload_id'], $chunk, $offset);
    }

    fclose($handle);
    $file = $client->file->completeLargeUpload($upload['upload_id']);
}
```

Use `getLargeUploadProgress()` to query server-side progress, `cancelLargeUpload()` to cancel the session through the JSON API, or `terminateLargeUpload()` to terminate it through TUS.

### Bio Pages

[](#bio-pages)

```
$bio = $client->bioPage->create('My profile', [
    'description' => 'About me',
    'domain' => 's.ee',
    'custom_links' => [
        ['title' => 'Website', 'url' => 'https://example.com'],
    ],
]);

$client->bioPage->update($bio['bio_page_id'], 'Updated profile');
$pages = $client->bioPage->getHistory(page: 1);
$client->bioPage->delete($bio['bio_page_id']);
```

### QR Codes

[](#qr-codes)

```
$qrCode = $client->qrCode->create('https://example.com', 'Example', [
    'domain' => 's.ee',
    'custom_slug' => 'example-qr',
]);

$codes = $client->qrCode->getHistory(page: 1);
$client->qrCode->delete('s.ee', $qrCode['slug']);
```

### Common

[](#common)

**Get Available Domains:**

```
$domains = $client->common->getDomains();
print_r($domains);
```

**Get Tags:**

```
$tags = $client->common->getTags();
print_r($tags);
```

**Get account usage:**

```
$usage = $client->common->getUsage();
```

### Token Validation

[](#token-validation)

This endpoint validates a token supplied in the request body and does not rely on the client's authorization header.

```
$token = $client->token->check('TOKEN_TO_VALIDATE');
var_dump($token['valid']);
```

Responses and Errors
--------------------

[](#responses-and-errors)

Successful methods return the API response's `data` value. Endpoints without a `data` value return the complete response object, and successful empty TUS responses return an empty array. API, HTTP, transport, and invalid JSON failures throw `See\Exception\SeeException`.

Examples
--------

[](#examples)

There are example scripts in the `examples/` directory demonstrating how to use different services.

To run the examples, you need to set the `SEE_API_KEY` environment variable. Optionally, you can set `SEE_API_BASE` if you need to use a different API endpoint.

**Short URL Example:**

```
export SEE_API_KEY="your_api_key"
php examples/url.php
```

**Text Paste Example:**

```
export SEE_API_KEY="your_api_key"
php examples/text.php
```

**File Service Example:**

```
export SEE_API_KEY="your_api_key"
php examples/file.php
```

Testing
-------

[](#testing)

The project includes request-level PHPUnit tests for the service modules and shared response handling.

Run all unit tests:

```
composer check
```

Run tests for a specific module:

```
# Test Short URL service
./vendor/bin/phpunit tests/ShortUrlTest.php

# Test Text service
./vendor/bin/phpunit tests/TextTest.php

# Test File service
./vendor/bin/phpunit tests/FileTest.php

# Test the extended API surface
./vendor/bin/phpunit tests/ApiCoverageTest.php
```

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance96

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

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

18d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/174686444?v=4)[s.ee](/maintainers/sdotee)[@sdotee](https://github.com/sdotee)

---

Top Contributors

[![mingcheng](https://avatars.githubusercontent.com/u/21816?v=4)](https://github.com/mingcheng "mingcheng (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![Showfom](https://avatars.githubusercontent.com/u/6773591?v=4)](https://github.com/Showfom "Showfom (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)
