PHPackages                             superdesk/contentapi-sdk-php - 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. superdesk/contentapi-sdk-php

ActiveProject[API Development](/categories/api)

superdesk/contentapi-sdk-php
============================

Superdesk Content API SDK written in PHP

v0.1(10y ago)185.7k6[1 PRs](https://github.com/superdesk/contentapi-sdk-php/pulls)1GPL-3.0PHPPHP &gt;=5.3

Since Aug 26Pushed 10y ago5 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Superdesk Content API PHP SDK
=============================

[](#superdesk-content-api-php-sdk)

[![Build Status](https://camo.githubusercontent.com/5466b831661ef2d468c8dfd463d80c8636857984c560bdfa496bbdd30d2f51c7/68747470733a2f2f7472617669732d63692e6f72672f73757065726465736b2f636f6e74656e746170692d73646b2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/superdesk/contentapi-sdk-php)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/46f820a0288a066760b64cf9d4b15cd0ef24e942cd653992a23fc6c1bb8eb85a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73757065726465736b2f636f6e74656e746170692d73646b2d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/superdesk/contentapi-sdk-php/?branch=master)[![Code Climate](https://camo.githubusercontent.com/26a9941fd065d4c52adcae38ec9cd221c43a6366b652ed7dd5a6083882819897/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73757065726465736b2f636f6e74656e746170692d73646b2d7068702f6261646765732f6770612e737667)](https://codeclimate.com/github/superdesk/contentapi-sdk-php)[![SensioLabsInsight](https://camo.githubusercontent.com/1655f7ae54d7e75cb9e19a2a32661596f5c49f120de574fc669559452c8fa394/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62376662623835392d336433372d343934352d393161652d3934306461663030373365632f6d696e692e706e67)](https://insight.sensiolabs.com/projects/b7fbb859-3d37-4945-91ae-940daf0073ec)

This is an SDK written in PHP for the Superdesk Content API.

For more information about the Superdesk Content API please read the [documentation](http://docs.superdeskcontentapi.apiary.io/).

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

[](#installation)

### Requirements

[](#requirements)

- PHP &gt;= 5.3

When using the CurlApiClient and CurlClient classes make sure you've installed the following PHP extensions:

- [cURL](http://php.net/manual/book.curl.php)
- [Multibyte String](http://php.net/manual/book.mbstring.php)

### Composer

[](#composer)

- Require the SDK as a composer dependency

```
$ php composer.phar require superdesk/contentapi-sdk-php
```

### Manual

[](#manual)

- Download a copy of the SDK
- Add the classes to your autoloader

Customization
-------------

[](#customization)

You can use your own client classes instead of [CurlClient](src/Superdesk/ContentApiSdk/Client/CurlClient.php) and [CurlApiClient](src/Superdesk/ContentApiSdk/Client/CurlApiClient.php) files. This is for example useful if your framework or project already has it's own http client, you can easily incorporate that without having multiple depencencies. All you need to do is to implement the [ClientInterface](src/Superdesk/ContentApiSdk/Client/ClientInterface.php) and [ClientApiInterface](src/Superdesk/ContentApiSdk/Client/ClientApiInterface.php). For the ClientApi class there also a useful abstract class [AbstractApiClient](src/Superdesk/ContentApiSdk/Client/AbstractApiClient.php)which contains some sane defaults.

Examples
--------

[](#examples)

This example uses the [CurlClient](src/Superdesk/ContentApiSdk/Client/CurlClient.php)and [CurlApiClient](src/Superdesk/ContentApiSdk/Client/CurlApiClient.php) files.

You can run the [example.php](sample/default-client/example.php) via the cli with the command:

```
$ php sample/default-client/example.php
```

Make sure you have the extenions *cURL* and *Multibyte String* enabled and you've installed the vendors.

```
$ php composer.phar install --no-dev
```

### Samples

[](#samples)

#### Authentication

[](#authentication)

OAuth username and password authentication. The [CurlApiClient](src/Superdesk/ContentApiSdk/Client/CurlApiClient.php)will automatically try to retrieve new access token if the previous token has been invalited.

```

```

#### Pagination and traversing through results

[](#pagination-and-traversing-through-results)

We use [Pagerfanta](https://github.com/whiteoctober/Pagerfanta) as a pagination library. All results returned from the methods *getItems(...)* and *getPackages(...)* are actually Pagerfanta instances. That should make it easy enough to traverse through your API results and also built in your own pagination.

```

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

4010d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/164319?v=4)[Mischa Gorinskat](/maintainers/m038)[@m038](https://github.com/m038)

![](https://www.gravatar.com/avatar/a627b5dddd890c30bd726f716d46e574cfaf91c86ec6dab92d276c96ec52f7ae?d=identicon)[sd\_webpublisher](/maintainers/sd_webpublisher)

---

Top Contributors

[![m038](https://avatars.githubusercontent.com/u/164319?v=4)](https://github.com/m038 "m038 (106 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

Superdesk Web PublisherSuperdeskContent API SDKSuperdesk Content APISuperdesk SDK

### Embed Badge

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

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

313188.5k2](/packages/pimax-fb-messenger-php)

PHPackages © 2026

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