Server API Overview

The Server API Overview provides information on how to perform specific actions using our Server libraries.

Where possible each section provides an overview of the action, a reference-style guide to the constructor, property or method and an example of how it is used

The reference-style guide and examples may contain information for different languages. You can choose which language you wish to view by clicking on the appropriate tab as below.

require 'pusher'

Pusher.app_id = 'APP_ID'
Pusher.key = 'APP_KEY'
Pusher.secret = 'APP_SECRET'

Pusher.trigger('my-channel', my-event', {:message => 'hello world'})
require('Pusher.php');

$pusher = new Pusher(APP_KEY, APP_SECRET, APP_ID);
$pusher->trigger('my-channel', 'my-event', array( 'message' => 'hello world'));
using PusherServer;

var pusher = new Pusher(APP_ID, APP_KEY, APP_SECRET);
pusher.Trigger("my-channel", "my-event", new { message = "hello world" });
var Pusher = require( 'pusher' );

var pusher = new Pusher({ appId: APP_ID, key: APP_KEY, secret: APP_SECRET });
pusher.trigger( 'my-channel', 'my-event', { message: "hello world" } );
import pusher

instance = pusher.Pusher(app_id='APP_ID', key='APP_KEY', secret='APP_SECRET')
instance['mychannel'].trigger('my-event',{'message': 'hello world'})

The Guide

Have you tried using the search to find what you’re after? If you still have a question then get in touch with us and let us help you out.