Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Twitch Laravel Package

romanzipp/laravel-twitch

Laravel Twitch is a clean wrapper around the Twitch Helix API for Laravel apps. It handles OAuth token management and provides fluent methods for users, streams, games, clips, and more, letting you integrate Twitch data without writing boilerplate HTTP code.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for Twitch integration. This package is still the "buy" option at its cheapest: MIT-licensed, Composer-installable, and it front-loads the boring parts of Twitch's Helix API — app/user OAuth token acquisition and refresh, credential config, and a Laravel service provider/facade so your app calls Twitch::users(...) style wrappers instead of hand-rolling HTTP and token lifecycle code. The decision it informs is: do we spend 1–2 sprint weeks of engineering on a first-party Twitch client, or a few days wiring this up and validating the feature?
  • Version-pinning is now an explicit product decision. The package shipped 4.0.0, a breaking major. 4.x is the right target for new work (fresh install, no migration), but anyone already on 3.x faces a real upgrade task rather than a composer update — see the cost list below. That means the PM call is no longer "adopt or not," it's "greenfield on 4.x, or timebox a 3.x→4.x migration for an existing integration."
  • Feature scoping for a Twitch surface area. Typical candidates this enables: "is this channel live?" badges and stream-status widgets, creator/streamer profiles (avatars, follower counts, game/category metadata), VOD and clip galleries, top-games dashboards, and creator-discovery/search for influencer or sponsorship workflows. Each is a read-mostly use case that maps cleanly to a REST wrapper, and the new result-object helpers (getPagination(), getPaginator()) keep paged galleries cheap to build.
  • Roadmap sequencing / MVP validation. Because the integration cost is low, a PM can put a Twitch-powered feature into a discovery experiment or beta without committing platform headcount. If the feature validates, you can later justify replacing the wrapper with an in-house client; if it doesn't, sunk cost is days, not weeks.
  • Platform-fit decision. It only pays off if the product is already Laravel and comfortable with facades, published config, and .env-driven secrets. On a polyglot or non-Laravel stack, this package is a non-starter and the "build" branch becomes the default.
  • Explicitly out of scope for this package: Twitch EventSub webhook subscriptions (stream-online/offline, follow events) and chat/IRC integration. If your roadmap item is real-time alerts or chat moderation, budget separately — this is a REST polling wrapper, not an event pipeline. Nothing in 4.0.0 changes that.

When to Consider This Package

Adopt it when all of these hold:

  • The codebase is on a Laravel/PHP combination this package actually supports — check composer.json on the 4.x branch against your framework and PHP version. 4.0.0 is a maintenance signal (the maintainer is still shipping, and it drops Guzzle 6.3), but the release notes advertise API changes, not a Laravel-version support matrix; verify before you design around it.
  • Your needs are read-oriented Helix endpoints: users, streams, games, videos, clips, search.
  • The integration is an internal tool, MVP, or beta where an infrequently-released dependency is an acceptable, documented risk.
  • One engineer owns a fork-and-patch plan: you're prepared to vendor or fork the repo, fix a broken endpoint, and re-tag internally when Twitch changes a response shape.
  • You are starting fresh on 4.x, or you have budgeted the 3.x→4.x migration: Result properties are now private behind getters (->data → ->getData(), ->total/->pagination → ->getTotal()/->getPagination()), status()/error()/rateLimit() were renamed to getStatus()/getErrorMessage()/getRateLimit(), Result::$success is gone (branch on the status code instead), three credential exceptions collapsed into RequestRequiresAuthenticationException, Helpers\Paginator moved to Objects\Paginator, and the cache-driver config key was removed.

Look elsewhere (or budget a thin in-house client over Guzzle/Saloon) when:

  • You need active maintenance, security patch cadence, or a dependency your SCA tooling will accept without a waiver. A 4.0.0 is a positive signal that this isn't abandoned software, but it is still a small, single-maintainer project — low bus factor remains the core risk, not staleness.
  • You're on a current Laravel release and 4.x's constraints don't cover it, or you need first-class rate-limit handling, retry/backoff, typed DTOs, or async/bulk request support at scale.
  • The requirement includes EventSub, chat, or extensions — those need a different library or a custom implementation.
  • Twitch is a revenue-critical path rather than a nice-to-have widget; an infrequently-released wrapper on a monetized surface is an availability risk you don't want to explain.
  • Your team's Twitch knowledge is sourced from 3.x-era tutorials and snippets. Most public examples still use the old public properties and method names, so budget a short internal note or a wrapper of your own so engineers don't copy broken patterns into a 4.x codebase.

How to Pitch It (Stakeholders)

To executives: Twitch integration can be tested for roughly a few engineering days instead of a multi-week build, using a free MIT-licensed library that plugs directly into our existing Laravel stack. It gives us live-status, creator-profile, and VOD/clip data with no new vendor contract and no new infrastructure — the cheapest possible way to find out whether a Twitch-powered feature moves activation or retention before we staff it. The trade-off is explicit and small: the library is a small, single-maintainer project that releases infrequently (4.0.0 is the current major), so we treat it as prototype-grade, cap the investment, and revisit a maintained or in-house client only if the feature earns its roadmap slot. For any existing Twitch code on the prior major, treat the upgrade as a small, scoppable piece of work — not a free version bump.

To engineering: It handles the parts nobody wants to write twice — credential config, app and user OAuth token acquisition/refresh, and endpoint wrappers behind a facade — so we ship features, not plumbing. Two things changed with 4.0.0 that affect our plan. First, it's a breaking major: Result properties are private behind getters, status()/error()/rateLimit() became getStatus()/getErrorMessage()/getRateLimit(), Result::$success was removed, the three "requires client id/secret/redirect uri" exceptions were consolidated into RequestRequiresAuthenticationException, Paginator moved to the Objects namespace, and the cache-driver config key is gone — so grep for ->data, ->success, ->status(), ->error(), and any published config before estimating. Since the cache setting is no longer configurable, re-check where app tokens are cached if we run multiple instances. Second, a new major is evidence the maintainer is alive, which softens — but does not remove — the bus-factor risk; we still assume we fork it for fixes rather than wait on upstream. Recommend a time-boxed spike with three exit criteria: (1) token acquisition and refresh work against our Laravel/PHP version on 4.x, (2) the three endpoints we actually need return what the product spec requires, (3) any 3.x code is either migrated or deliberately pinned with a documented reason. If the first two fail, fall back to a 200-line first-party client.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource