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

ActiveLibrary[API Development](/categories/api)

frostbit/twitch
===============

Twitch.tv API library developed by Frostbit.cz.

1.0.0(11y ago)1102GPL-2.0+PHPPHP &gt;=5.3.3

Since Mar 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Frostbit/twitchApi)[ Packagist](https://packagist.org/packages/frostbit/twitch)[ RSS](/packages/frostbit-twitch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

twitchApi
=========

[](#twitchapi)

Twitch.tv API Library developed by Frostbit.cz.

[![Latest Stable Version](https://camo.githubusercontent.com/5630231938c8fed727468cb33a312e82202c7ccc0596afe7e0ddc3b459dc74e5/68747470733a2f2f706f7365722e707567782e6f72672f66726f73746269742f7477697463682f762f737461626c652e737667)](https://packagist.org/packages/frostbit/twitch)[![Build Status](https://camo.githubusercontent.com/4afc3b43a3d7066b0a884c9f5558131b2adfeb0036cd6e2e49b4d34bcd3e1f0d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f46726f73746269742f7477697463684170692f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Frostbit/twitchApi/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/98c01251536a11bba90d67adb85de3b10921398f3b308216ff0be3b7fe2450ad/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f46726f73746269742f7477697463684170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Frostbit/twitchApi/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/f3c7bb0b091ad035c1e6fb6709e50c730a9e5294b729344229d763396aaf1edf/68747470733a2f2f706f7365722e707567782e6f72672f66726f73746269742f7477697463682f646f776e6c6f6164732e737667)](https://packagist.org/packages/frostbit/twitch)

Install
-------

[](#install)

Put following line into your composer.json (require) and run composer update. [Packagist!](https://packagist.org/packages/frostbit/twitch)

```
"frostbit/twitch": "dev-master"

```

Settings
--------

[](#settings)

Update return URI, Scopes, client ID and client secret in OAuth &amp; Twitch classes.

```
// Frostbit/Twitch/OAuth.php
const OAUTH_URL     = 'https://api.twitch.tv/kraken/oauth2/authorize';
const TOKEN_URL     = 'https://api.twitch.tv/kraken/oauth2/token';
const RESPONSE_TYPE = 'code';
const CLIENT_ID     = 'your_client_id';
const CLIENT_SECRET = 'your_secret';
const BACK_URL      = 'your_uri';
const SCOPE         = 'user_read';

// Frostbit/Twitch/Twitch.php
const API_URL   = 'https://api.twitch.tv/kraken';
const ACCEPT    = 'application/vnd.twitchtv.v3+json';
const CLIENT_ID = 'your_client_id';
```

Usage
-----

[](#usage)

```
use Frostbit\Twitch\Twitch;

$twitch = new Twitch;
$channel = $twitch->getChannel("swifty");
...

// OAuth for get Twitch OAuth URI with your params and get access token from received code.
use Frostbit\Twitch\OAuth;

$oAuth = new OAuth;
$redirectUri = $oAuth->getAuthenticateUri();
```

Support
-------

[](#support)

List of supported functions.

- Channel
- Stream
- Games
- Chat
- Emoticons
- User
- Autorized User (user\_read scope)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~20 days

Total

2

Last Release

4072d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44d9a3ac438f3ad6ef3fe4c09d899f8927174e32c58a799eca5d64834e12c544?d=identicon)[mrfrostikcz](/maintainers/mrfrostikcz)

---

Top Contributors

[![mrfrostikcz](https://avatars.githubusercontent.com/u/3492840?v=4)](https://github.com/mrfrostikcz "mrfrostikcz (45 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

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

GitHub API v3 client

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

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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