Repolode
pusher

pusher/pusher-http-php

PHP library for sending events, authenticating users and querying channels through the Pusher Channels HTTP API.

Stars
1,477
Forks
317
Open issues
3
Last commit
3 months ago

What is it?

This Composer package gives PHP applications a server-side client for Pusher Channels, a hosted service for real-time messaging over WebSockets. It lets a backend publish events to one or many channels, send batches of events in one API call, and use async calls that return Guzzle promises.

The library also covers the authorization flows Pusher requires: authenticating users, authorizing private channels, and authorizing presence channels with user data. It can verify webhook signatures from Pusher and optionally encrypt event data on channels prefixed with private-encrypted-, using a master key you supply. Queries cover channel info, channel lists filtered by prefix, and presence channel users.

It supports PHP 7.3 through 8.4, and Laravel 8.29 and later includes Pusher Channels as a built-in broadcasting backend. A PSR-3 logger and a custom Guzzle client can be injected.

Key features

  • 01Trigger events on single or multiple channels, with batch sending of up to 10 events per call on multi-tenant clusters
  • 02Async trigger methods returning Guzzle promises
  • 03Authorize private and presence channels and authenticate users
  • 04Verify Pusher webhook signatures and parse received events
  • 05End-to-end encryption for channels prefixed with private-encrypted-
  • 06Query channel info, channel lists and presence users via the HTTP API

Use cases

  • Pushing live notifications or chat messages from a PHP backend to browser clients
  • Authorizing private or presence channel subscriptions in a PHP login endpoint
  • Receiving and verifying Pusher webhooks in a PHP service
  • Using Pusher as a broadcasting driver in a Laravel application

Quick start

  1. 1

    Install the library with Composer

    composer require pusher/pusher-php-server
  2. 2

    Register at pusher.com and get your app credentials

  3. 3

    Create a Pusher instance with your credentials

  4. 4

    Trigger an event on a channel

Things to know

  • No license is specified, so usage rights are unclear.
  • Requires a Pusher Channels account and application credentials to use.
  • A single trigger call cannot mix encrypted and unencrypted channels.

Topics

FAQ

What is pusher-http-php?
PHP library for sending events, authenticating users and querying channels through the Pusher Channels HTTP API. This Composer package gives PHP applications a server-side client for Pusher Channels, a hosted service for real-time messaging over WebSockets. It lets a backend publish events to one or many channels, send batches of events in one API call, and use async calls that return Guzzle promises.
Is pusher-http-php free to use? What license does it have?
pusher-http-php has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
Is pusher-http-php still maintained?
Updated within 6 months. The last commit to pusher-http-php was on Aug 7, 2026.
What can I use pusher-http-php for?
Pushing live notifications or chat messages from a PHP backend to browser clients Authorizing private or presence channel subscriptions in a PHP login endpoint Receiving and verifying Pusher webhooks in a PHP service Using Pusher as a broadcasting driver in a Laravel application
How do I install pusher-http-php?
Install the library with Composer: composer require pusher/pusher-php-server Register at pusher.com and get your app credentials Create a Pusher instance with your credentials Trigger an event on a channel
Where can I get pusher-http-php?
The source code and installation instructions are on GitHub: https://github.com/pusher/pusher-http-php

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects