Pusher | Leader In Realtime Technologies Products Build scalable realtime features Programmatic push notifications Developers Docs Read the docs to learn how to use our products Tutorials Explore our tutorials to build apps with Pusher products Support Reach out to our support team for help and advice Glossary Get familiar with Pusher-specific terminology User stories Blog Pricing Build scalable realtime features Programmatic push notifications Sign in Sign up Powering realtime experiences for mobile and web Bi-directional hosted APIs that are flexible, scalable and easy to use. We create and maintain complex messaging infrastructure so you can build the realtime features your users need, fast. Bi-directional hosted APIs that are flexible, scalable and easy to use. Get started today and find out what you can build with Pusher Use Cases Get your free account Pubsub Notifications Publish PHP Node Ruby ASP Java Python Go $pusher -> trigger ( 'my-channel' , 'my-event' , [ 'message' => 'hello world' ]); PHP Node Ruby ASP Java Python Go $pusher -> trigger ( 'my-channel' , 'my-event' , [ 'message' => 'hello world' ]); pusher. trigger ( 'my-channel' , 'my-event' , { "message" : "hello world" }); pusher. trigger ( 'my-channel' , 'my-event' , { message : 'hello world' }) pusher. Trigger ( 'my-channel' , 'my-event' , new { message = "hello world" }); pusher. trigger ( "my-channel" , "my-event" , Collections . singletonMap ( "message" , "hello world" )); pusher. trigger ( 'my-channel' , 'my-event' , { 'message' : 'hello world' }) pusher.Trigger( "my-channel" , "my-event" , map[ string ] string { "message" : "hello world" , }) Subscribe JS Android iOS (Swift) iOS (Obj-C) var channel = pusher. subscribe ( 'my-channel' ); channel. bind ( 'my-event' , function ( data ) { alert( 'Received my-event with message: ' + data .message); }); JS Android iOS (Swift) iOS (Obj-C) var channel = pusher. subscribe ( 'my-channel' ); channel. bind ( 'my-event' , function ( data ) { alert( 'Received my-event with message: ' + data .message); }); Channel channel = pusher. subscribe ( "my-channel" ); channel. bind ( "my-event" , new SubscriptionEventListener () { @Override public void onEvent ( String channel, String event, String data ) { System.put.println( "Received event with data: " + data ); } }); let channel = pusher. subscribe ( "my-channel" ) channel. bind ( eventName : "my-event" , callback : { ( optionalData : Any?) -> Void in if let data = optionalData { print ( "Received event with data: \(data) " ) } }) PusherChannel *channel = [pusher subscribeWithChannelName :@ "my-channel" ]; [channel bindWithEventName: @"my-event" callback:^ void ( NSDictionary *data) { NSString *message = data [@ "message" ]; NSLog (@ "message received: %@" , message); }]; Learn more Publish API Node.JS Go Python Java Kotlin Ruby const beamsClient = new PushNotifications ({ instanceId : 'YOUR_INSTANCE_ID_HERE' , secretKey : 'YOUR_SECRET_KEY_HERE' }); beamsClient. publishToInterests ([ 'hello' ], { apns: { aps: { alert : 'Hello!' } }, fcm: { notification: { title : 'Hello' , body : 'Hello, world!' } } }). then ( ( publishResponse ) => { console . log ( 'Just published:' , publishResponse. publishId ); }). catch ( ( error ) => { console . error ( 'Error:' , error); }); Node.JS Go Python Java Kotlin Ruby const beamsClient = new PushNotifications ({ instanceId : 'YOUR_INSTANCE_ID_HERE' , secretKey : 'YOUR_SECRET_KEY_HERE' }); beamsClient. publishToInterests ([ 'hello' ], { apns: { aps: { alert : 'Hello!' } }, fcm: { notification: { title : 'Hello' , body : 'Hello, world!' } } }). then ( ( publishResponse ) => { console . log ( 'Just published:' , publishResponse. publishId ); }). catch ( ( error ) => { console . error ( 'Error:' , error); }); const ( instanceId = "YOUR_INSTANCE_ID_HERE" secretKey = "YOUR_SECRET_KEY_HERE" ) beamsClient := pushnotifications.New(instanceId, secretKey) publishRequest := map[ string ] interface {}{ "apns" : map[ string ] interface {}{ "aps" : map[ string ] interface {}{ "alert" : map[ string ] interface {}{ "title" : "Hello" , "body" : "Hello, world" , }, }, }, "fcm" : map[ string ] interface {}{ "notification" : map[ string ] interface {}{ "title" : "Hello" , "body" : "Hello, world" , }, }, } pubId, err := beamsClient.PublishToInterests([] string { "hello" }, publishRequest) if err != nil { fmt.Println(err) } else { fmt. Println ( "Publish Id:" , pubId) } beams_client = PushNotifications( instance_id= 'YOUR_INSTANCE_ID_HERE' , secret_key= 'YOUR_SECRET_KEY_HERE' , ) response = beams_client.publish_to_interests( interests=[ 'hello' ], publish_body={ 'apns' : { 'aps' : { 'alert' : 'Hello!' , }, }, 'fcm' : { 'notification' : { 'title' : 'Hello' , 'body' : 'Hello, world!' , }, }, }, ) print (response[ 'publishId' ]) String instanceId = "YOUR_INSTANCE_ID_HERE" ; String secretKey = "YOUR_SECRET_KEY_HERE" ; PushNotifications beamsClient = new PushNotifications (instanceId, secretKey); List < String > interests = Arrays . asList ( "donuts" , "pizza" ); Map < String , Map > publishRequest = new HashMap (); Map < String , String > alert = new HashMap (); alert. put ( "alert" , "hi" ); Map < String , Map > aps = new HashMap (); aps. put ( "aps" , alert); publishRequest. put ( "apns" , aps); Map < String , String > fcmNotification = new HashMap (); fcmNotification. put ( "title" , "hello" ); fcmNotification. put ( "body" , "Hello world" ); Map < String , Map > fcm = new HashMap (); fcm. put ( "notification" , fcmNotification); publishRequest. put ( "fcm" , fcm); beamsClient.publishToInterests(interests, publishRequest); val instanceId = "YOUR_INSTANCE_ID_HERE" val secretKey = "YOUR_SECRET_KEY_HERE" val beamsClient = PushNotifications(instanceId, secretKey) val interests = listOf( "donuts" , "pizza" ) val publishRequest = hashMapOf( "apns" to hashMapOf ( "aps" to hashMapOf ( "alert" to "hi" )), "fcm" to hashMapOf ( "notification" to hashMapOf ( "title" to "hello" , "body" to "Hello world" )) ) beamsClient.publishToInterests(interests, publishRequest) Pusher :: PushNotifications .configure do |config| config. instance_id = 'YOUR_INSTANCE_ID_HERE' config. secret_key = 'YOUR_SECRET_KEY_HERE' end data = { apns: { aps: { alert: { title : 'Hello' , body : 'Hello, world!' } } }, fcm: { notification: { title : 'Hello' , body : 'Hello, world!' } } } Pusher :: PushNotifications . publishToInterests ( interests : [ 'hello' ], payload : data) Learn more Trusted by Giants. Loved by developers. What can you build with Pusher? Realtime charts From dashboards to stock charts, update data instantly Read more Notifications Critical transactional information, delivered every time Read mor