PHPackages                             skmetaly/laravel-twitch-restful-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. skmetaly/laravel-twitch-restful-api

ActiveLibrary

skmetaly/laravel-twitch-restful-api
===================================

Laravel twitch api

83784[1 issues](https://github.com/skmetaly/laravel-twitch-restful-api/issues)PHP

Since Mar 31Pushed 11y ago3 watchersCompare

[ Source](https://github.com/skmetaly/laravel-twitch-restful-api)[ Packagist](https://packagist.org/packages/skmetaly/laravel-twitch-restful-api)[ RSS](/packages/skmetaly-laravel-twitch-restful-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-twitch-restful-api
==========================

[](#laravel-twitch-restful-api)

Laravel Twittch restful api. An implementation of the twitch restful api V3 provided by Twitch.tv Documentation of the API can be found at [Twitch restful api link](https://github.com/justintv/Twitch-API)

Installation
============

[](#installation)

Require the package in composer.json :

```
"skmetaly/laravel-twitch-restful-api": "dev-master"
```

In `config/app.php` add `providers`

```
'Skmetaly\TwitchApi\Providers\TwitchApiServiceProvider'
```

In `aliases`

```
'TwitchApi'=>'Skmetaly\TwitchApi\Facades\TwitchApiServiceFacade'
```

Publish the config

```
php artisan vendor:publish --force
```

Create a twitch application ( in your twitch settings page, Connections tab ) Create a client secret Add both client secret, client id to the twitch-api.php config

Change the scopes that the application needs to better suit your needs

Usage
=====

[](#usage)

The api provides both non-authenticated and authenticated requests

Authentication
--------------

[](#authentication)

Twitch api uses [OAuth 2.0 protocol](http://hueniverse.com/2010/05/introducing-oauth-2-0) for authentication.

This API uses the Authorization Code Flow.

First step for authenticating a user is to send him to the twitch authentication URL

```
   public function authenticate()
   {
       return Redirect::to(TwitchApi::authenticationURL());
   }
```

Keep in mind that the api uses the config set in twitch-api.redirect\_url for redirecting after authentication

After the user accepted the scopes and authorised your app, it will be redirected at the value set in config('twitch-api.redirect\_url')

A sample of handling the redirect :

```
   public function redirect()
   {
       $code = Input::get('code');

       $token = TwitchApi::requestToken($code);
   }
```

You need to persist both the username and token associated with it to use all of the authenticated requests

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/skmetaly-laravel-twitch-restful-api/health.svg)

```
[![Health](https://phpackages.com/badges/skmetaly-laravel-twitch-restful-api/health.svg)](https://phpackages.com/packages/skmetaly-laravel-twitch-restful-api)
```

PHPackages © 2026

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