APIs for Connected Experiences

Build low-latency secure chat consumer IoT global messaging live community delivery tracking realtime applications that perform reliably and securely, at global scale.

REALTIME NOTIFICATIONS

Realtime Notifications

APIs to deliver realtime alerts including push notifications, in-app alerts, SMS, email and more.

CHAT

Powerful chat APIs

Powerful chat APIs, for secure and reliable private and group messaging at massive scale.

IoT DEVICE CONTROL

IoT Devices Control

IoT APIs to trigger device action, monitor status and process pub/sub data.

Trusted by 2,000 companies worldwide.

See all customers
  • JavaScript
  • .Net
  • Obj-C
  • Swift
  • Android/Java
  • // send a message
  • pubnub.publish({
  • channel: 'chatChannel',
  • message: { foo : 'bar' }
  • }, function ( status, response ) {
  • console.log( status.error, response )
  • })
  • Dictionary<string, string> chatMessage = new Dictionary<string, string>();
  • chatMessage.Add("foo", "bar");
  • pubnub.Publish<string>(
  • channel:"chatChannel",
  • message: chatMessage,
  • userCallback: DisplayPublishReturnMessage,
  • errorCallback: DisplayErrorMessage);
  • - (void)client: (PubNub *)client didReceiveStatus: (PNStatus *)status {
  • if (status.operation == PNSubscribeOperation && status.category == PNConnectedCategory) {
  • [self.client publish: @{@"foo": @"bar"} toChannel: @"chatChannel"
  • withCompletion:^(PNPublishStatus *publishStatus) {
  • if (!publishStatus.isError) {
  • NSLog(@"Published!");
  • }
  • else {
  • NSLog(@"Publish did fail with error: %@",
  • status.errorData.data?: status.errorData.information);
  • }
  • }];
  • }
  • }
  • func client(client: PubNub, didReceiveStatus status: PNStatus) {
  • if status.operation == .SubscribeOperation && status.category == .PNConnectedCategory {
  • client.publish(["foo": "bar"], toChannel: "chatChannel",
  • withCompletion: { (publishStatus) in
  • if !publishStatus.error {
  • print("Published!")
  • }
  • else {
  • print("Publish did fail with error: \(status.errorData.data ?? status.errorData.information)")
  • }
  • })
  • }
  • }
  • Map message = new HashMap();
  • message.put("foo", "bar");
  • pubnub.publish()
  • .channel("chatChannel")
  • .message(message)
  • .async(new PNCallback<PNPublishResult>() {
  • @Override
  • public void onResponse(PNPublishResult result, PNStatus status) {
  • if (status.isError()) {
  • System.out.println(status);
  • } else {
  • System.out.println("Published!");
  • }
  • }
  • });
Publish
  • JavaScript
  • .Net
  • Obj-C
  • Swift
  • Android/Java
Subscribe
Functions
  • export default request => {
  • request.message.hello = 'world!'
  • return request.ok()
  • }

Developers Developers Love PubNub PubNub

2 Trillion

Monthly Transactions

330 Million

Unique Monthly Devices

<1/4 Second

Latency Worldwide

99.999%

Uptime SLAs

Enterprise-Grade Security Comes Standard

Enterprise-Grade Security Comes Standard

  • TLS and AES256 Encryption
  • SOC 2 Type II Compliant
  • HIPAA Compliant
  • EU GDPR Compliant
  • EU-US Privacy Shield Certified
  • EU and US-Only Data Storage
AICPA SOCHI PAAGDPRPrivacy Shield Framework

Ready To Get Started?

Contact Sales