PHPackages                             yebto/short-links-api - 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. yebto/short-links-api

ActiveLibrary[API Development](/categories/api)

yebto/short-links-api
=====================

PHP SDK for the YEB Short Links API. Create, manage and track shortened URLs.

00PHP

Since Mar 6Pushed 2mo agoCompare

[ Source](https://github.com/yebto/short-links-api)[ Packagist](https://packagist.org/packages/yebto/short-links-api)[ RSS](/packages/yebto-short-links-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

YEB ShortLinksAPI
=================

[](#yeb-shortlinksapi)

PHP SDK for the YEB Short Links API. Create, manage and track shortened URLs.

Works standalone (plain PHP) or with Laravel (Facade + auto-discovery).

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

[](#requirements)

- PHP 8.1+
- cURL extension
- [YEB API Key](https://yeb.to) (free tier available)

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

[](#installation)

```
composer require yebto/short-links-api
```

Standalone Usage
----------------

[](#standalone-usage)

```
use Yebto\ShortLinksAPI\ShortLinksAPI;

$api = new ShortLinksAPI(['key' => 'your-api-key']);
$result = $api->create('example');
```

Laravel Usage
-------------

[](#laravel-usage)

Add your API key to `.env`:

```
YEB_KEY_ID=your-api-key

```

Use via Facade:

```
use ShortLinksAPI;

$result = ShortLinksAPI::create('example');
```

Or via dependency injection:

```
use Yebto\ShortLinksAPI\ShortLinksAPI;

public function handle(ShortLinksAPI $api)
{
    $result = $api->create('example');
}
```

### Publish Config

[](#publish-config)

```
php artisan vendor:publish --tag=yebto-short-links-config
```

Available Methods
-----------------

[](#available-methods)

MethodDescription`create($url)`Create a short link (alias for create-basic)`createBasic($url)`Create a basic short link`createAdvanced($url)`Create an advanced short link with options`get($code)`Get short link details`update($code)`Update a short link`delete($code)`Delete a short link`stats($code)`Get click statistics for a short linkAll methods accept an optional `$extra` array parameter for additional API options.

Error Handling
--------------

[](#error-handling)

```
use Yebto\ApiClient\Exceptions\ApiException;
use Yebto\ApiClient\Exceptions\AuthenticationException;
use Yebto\ApiClient\Exceptions\RateLimitException;

try {
    $result = $api->create('example');
} catch (AuthenticationException $e) {
    // Missing or invalid API key (401)
} catch (RateLimitException $e) {
    // Too many requests (429)
} catch (ApiException $e) {
    echo $e->getMessage();
    echo $e->getHttpCode();
}
```

Free API Access
---------------

[](#free-api-access)

Register at [yeb.to](https://yeb.to) with Google OAuth to get a free API key.

Support
-------

[](#support)

- API Documentation:
- Email:
- Issues: [GitHub Issues](https://github.com/yebto/short-links-api/issues)

License
-------

[](#license)

MIT - NETOX Ltd.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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/57d7e2ce619fb0a25c0b8ebf53ab60f9aba259cbb926f697dc0cb6b5349dea85?d=identicon)[yebto](/maintainers/yebto)

---

Top Contributors

[![yebto](https://avatars.githubusercontent.com/u/217711937?v=4)](https://github.com/yebto "yebto (2 commits)")

---

Tags

apilaravelphpsdkyeb

### Embed Badge

![Health badge](/badges/yebto-short-links-api/health.svg)

```
[![Health](https://phpackages.com/badges/yebto-short-links-api/health.svg)](https://phpackages.com/packages/yebto-short-links-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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