PHPackages                             ritero/twitch-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. ritero/twitch-sdk

AbandonedArchivedLibrary[API Development](/categories/api)

ritero/twitch-sdk
=================

TwitchTV API SDK for PHP

2.0.5(9y ago)1427.2k7[2 issues](https://github.com/jofner/Twitch-SDK/issues)MITPHPPHP &gt;=5.3.0

Since Jun 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jofner/Twitch-SDK)[ Packagist](https://packagist.org/packages/ritero/twitch-sdk)[ Docs](https://github.com/jofner/Twitch-SDK)[ RSS](/packages/ritero-twitch-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (9)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/dfb3d5291f9d549f56fbabe5553acc03efb895ff004da8977cb9cea066692e1d/68747470733a2f2f706f7365722e707567782e6f72672f72697465726f2f7477697463682d73646b2f762f737461626c65)](https://packagist.org/packages/ritero/twitch-sdk) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/f9f24e4d01090c3321112790bb0a780df107235e1a078632c41c7fb2c21aff93/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f666e65722f5477697463682d53444b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jofner/Twitch-SDK/?branch=master) [![Build Status](https://camo.githubusercontent.com/3fd13248af3ea158c6ba83f0a495ccd752c960ebb1f9695421a9d749e692dcc3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f666e65722f5477697463682d53444b2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jofner/Twitch-SDK/build-status/master) [![Total Downloads](https://camo.githubusercontent.com/4c8528b9d0f58dac403f8b93704759a8f06a2a5c2f83677f576acaf4d233eebf/68747470733a2f2f706f7365722e707567782e6f72672f72697465726f2f7477697463682d73646b2f646f776e6c6f616473)](https://packagist.org/packages/ritero/twitch-sdk) [![Latest Unstable Version](https://camo.githubusercontent.com/85c0b9488f2f726a84683d63106b0656741696a9541001eeb3031710029cd780/68747470733a2f2f706f7365722e707567782e6f72672f72697465726f2f7477697463682d73646b2f762f756e737461626c65)](https://packagist.org/packages/ritero/twitch-sdk#dev-develop) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/1c0276c8c21b29a17aa79ea7fead13a9ead6789ac831d8510d4e1c257a9cdcbd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f666e65722f5477697463682d53444b2f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/jofner/Twitch-SDK/?branch=develop) [![Build Status](https://camo.githubusercontent.com/9cbef26300d601682efaba13a7a68d1ac3564b3b269852f3e72e623d34ba8832/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f666e65722f5477697463682d53444b2f6261646765732f6275696c642e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/jofner/Twitch-SDK/build-status/develop) [![License](https://camo.githubusercontent.com/777e0d47e06069aa4a25c8a82ba9869b6d41224baae502c7763e0f3f41f8af50/68747470733a2f2f706f7365722e707567782e6f72672f72697465726f2f7477697463682d73646b2f6c6963656e7365)](https://packagist.org/packages/ritero/twitch-sdk)

TwitchTV SDK for PHP
====================

[](#twitchtv-sdk-for-php)

> UNMAINTAINED!!! I have no project to build SDK for or test on, so i abandoned this project. I'm sorry for that and i hope someone kind will continue with developing. Maybe another SDK's are around, so try search GitHub for alternative.

> This is unofficial [TwitchTV SDK for PHP](https://github.com/jofner/Twitch-SDK) formerly known as ritero/twitch-sdk

WARNING BEFORE UPDATING TO 2.\* !!!
-----------------------------------

[](#warning-before-updating-to-2-)

Version 2.\* changed namespace! I know it's not best practice and i'm really sorry, but i have my reasons for that. Thanks for understanding. Version 2.\* has BC breaks and lot of changes. Be careful with updating! Before updating thoroughly examine the changes and adjust your application for modified functions.

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

[](#requirements)

TwitchTV SDK for PHP requires PHP 5.3.0 or later with cURL extension enabled.

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

[](#installation)

The best way to install TwitchTV SDK is use [Composer](http://getcomposer.org/).

### Download the bundle using Composer

[](#download-the-bundle-using-composer)

```
$ composer require 'jofner/twitch-sdk:2.0.*'
```

The downloaded package includes the `src` directory. This directory contains the source code of TwitchTV SDK for PHP. This is the only directory that you will need in order to deploy your application.

Getting started
---------------

[](#getting-started)

Basic functions starts with standard naming policy (user\*, channel\* etc.) - `userGet()` for example. Authenticated functions have auth\* prefixes, like `authUserGet()`.

### SDK initialization in your project

[](#sdk-initialization-in-your-project)

#### With autoloader (Frameworks etc.)

[](#with-autoloader-frameworks-etc)

```
use \jofner\SDK\TwitchTV\TwitchSDK;

$twitch = new TwitchSDK;
...
```

#### Without Autoloader

[](#without-autoloader)

```
require '/path/to/libs/jofner/SDK/TwitchTV/TwitchSDK.php';
require '/path/to/libs/jofner/SDK/TwitchTV/TwitchSDKException.php';

use \jofner\SDK\TwitchTV\TwitchSDK;
use \jofner\SDK\TwitchTV\TwitchSDKException;

$twitch = new TwitchSDK;
...
```

### Usage

[](#usage)

#### Basic usage (public functions only)

[](#basic-usage-public-functions-only)

```
$twitch = new TwitchSDK;
$channel = $twitch->channelGet('channelname');
...
```

#### Authenticated functions usage

[](#authenticated-functions-usage)

```
$twitch_config = array(
    'client_id' => 'your_twitch_app_client_id',
    'client_secret' => 'your_twitch_app_client_secret',
    'redirect_uri' => 'your_twitch_app_redirect_uri',
);

$twitch = new TwitchSDK($twitch_config);
$loginURL = $twitch->authLoginURL('user_read');
...
```

More examples you can find soon at Wiki pages.

### Error: curl SSL certificate problem: self signed certificate in certificate chain

[](#error-curl-ssl-certificate-problem-self-signed-certificate-in-certificate-chain)

If you getting this error, you have probably out of date CA root certificates. Be sure you have in your php.ini set path to certificate in curl.cainfo = "..."

You can get cacert.pem from this site

Licenses
--------

[](#licenses)

Refer to the LICENSE.md file for license information

Reference
---------

[](#reference)

[TwitchTV SDK](https://github.com/jofner/Twitch-SDK), [TwitchTV](http://www.twitch.tv/), [TwitchTV API](https://github.com/justintv/Twitch-API), [Composer](http://getcomposer.org/)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% 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 ~87 days

Recently: every ~57 days

Total

8

Last Release

3389d ago

Major Versions

1.1.4 → 2.0.52017-02-05

### Community

Maintainers

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

---

Top Contributors

[![jofner](https://avatars.githubusercontent.com/u/133850?v=4)](https://github.com/jofner "jofner (10 commits)")[![nCrazed](https://avatars.githubusercontent.com/u/507466?v=4)](https://github.com/nCrazed "nCrazed (2 commits)")[![decrypted](https://avatars.githubusercontent.com/u/1056299?v=4)](https://github.com/decrypted "decrypted (1 commits)")

---

Tags

apisdktwitch

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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