PHPackages                             smartsites/linkshare-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. smartsites/linkshare-api

ActiveLibrary[API Development](/categories/api)

smartsites/linkshare-api
========================

API Wrapper for consuming LinkShare developer APIs.

v1.0.9(8y ago)06MITPHPPHP &gt;=5.6

Since Sep 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/smart-sites/linkshare-api)[ Packagist](https://packagist.org/packages/smartsites/linkshare-api)[ RSS](/packages/smartsites-linkshare-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (7)Versions (7)Used By (0)

linkshare-api
=============

[](#linkshare-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c1832ff012ccf6ebd8bf2e0c544a6d55bba35d88239ed0157c52db1e0b25245c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696e6b73686172652f6c696e6b73686172652d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/linkshare/linkshare-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1f6576a18feaba44d138f88ea7f6906f4890bf4ede39d0b22498c74803095a9a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74726166666963676174652f6c696e6b73686172652d6170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/trafficgate/linkshare-api)[![SensioLabsInsight](https://camo.githubusercontent.com/ca5bca32740d1f9500eb152f6a614575f56226fa0f3530e10f8f79134ed9c9e7/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f65373736623637622d366364642d343964642d386561382d6666633064306236383531312e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/e776b67b-6cdd-49dd-8ea8-ffc0d0b68511)[![StyleCI](https://camo.githubusercontent.com/182ce8b3a281dba15a0af0f4574da124c5a343947880f798eb3a10c02818ffcf/68747470733a2f2f7374796c6563692e696f2f7265706f732f36393533393139312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/69539191)[![Total Downloads](https://camo.githubusercontent.com/a6d263303e8c03f27889abf2048d2a1505dc9f6a4f7df4434a8a54794cb0e558/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c696e6b73686172652f6c696e6b73686172652d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/linkshare/linkshare-api)

API clients for consuming LinkShare developer APIs.

What is this?
-------------

[](#what-is-this)

This package provides clients for LinkShare's developer APIs.

[LinkShare Developer's Portal](https://developers.rakutenmarketing.com/)

Implementation is based on [The PHP League's OAuth 2.0 client libraries](https://github.com/thephpleague/oauth2-client).

Currently implemented APIs:

- Link Locator (partial implementation)
- Product Search

Usage
-----

[](#usage)

You can find examples of how to use the APIs under the examples folder.

Generally though, a new API client is created in the following fashion:

```
// Options contain the information required for
// authenticating against the API endpoints.
$options = [
    // Required: The client ID as provided by the developer's portal
    // This will vary for each API.
    'client_id'     => $clientId,

    // Required: The client secret as provided by the developer's portal
    // This will vary for each API.
    'client_secret' => $password,

    // Required: The access token as provided by the developer's portal
    // This will vary for each API.
    'access_token'  => $access_token,

    // Required: Your LinkShare Affiliate username
    'username'      => $username,

    // Required: Your LinkShare Affiliate password
    'password'      => $password,

    // Required: Your LinkShare Affiliate Site ID
    'scope'         => $scope,

    // Optional: The timeout (in seconds) before a request fails
    'timeout'       => $timeout,
];

// To create an API client, simply supply the required options as shown above
$linkLocator   = new LinkLocator($options);
$productSearch = new ProductSearch($options);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~104 days

Total

6

Last Release

2991d ago

### Community

Maintainers

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

---

Top Contributors

[![ikari7789](https://avatars.githubusercontent.com/u/1041215?v=4)](https://github.com/ikari7789 "ikari7789 (9 commits)")[![andrew-miller-rakuten](https://avatars.githubusercontent.com/u/159877857?v=4)](https://github.com/andrew-miller-rakuten "andrew-miller-rakuten (1 commits)")[![firelike](https://avatars.githubusercontent.com/u/452143?v=4)](https://github.com/firelike "firelike (1 commits)")[![sergey-nechaev](https://avatars.githubusercontent.com/u/3796512?v=4)](https://github.com/sergey-nechaev "sergey-nechaev (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/smartsites-linkshare-api/health.svg)

```
[![Health](https://phpackages.com/badges/smartsites-linkshare-api/health.svg)](https://phpackages.com/packages/smartsites-linkshare-api)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[spatie/laravel-route-attributes

Auto register routes using PHP attributes

879963.2k18](/packages/spatie-laravel-route-attributes)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)

PHPackages © 2026

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