1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - POST Requests
Open navigation

POST/push/login

The POST/push/login method grants a user with access to real time push notifications of Voicemails, SMS messages, Faxes, Live call events and Call history,  based on his provided channels and authentication credentials. 


The response will display subscription and channel information for a notification service. We use the PubNub real time data stream network as the provider for our push notifications service.

Read more about how to use PubNub for realtime push notifications with Telebroad communication services in this article.


 The request will return the following fields of information:


  • uuid - unique user ID. This is an identification number generated for each individual device subscribing or publishing push notifications on the PubNub network.

  • subcribe_key - a subscription key that the user needs to provide the server at initialization of the service to be able to subscribe (that is receive) push notifications published from the relevant Telebroad channels (see channels below). 

  • publish_key - a publishing key that the user needs to provide the server at initialization of the service to be able to publish (that is send) push notifications to the relevant subscribed Telebroad channels (see channels below).

    Note: a user who chooses to just subscribe needs to only initialize with a subscription key. Combining publishing and subscription allows for bi-directional communication between users, as in chat applications.

  • auth - a key that grants a user with access management rights using the PubNub Access Manager to extend their abilities to create and control secure real time data streams.

  • channels

    This is a container field detailing the different values assigned to each channel associated with the user's various Telebroad communication assets. Users receive messages only from the channels they subscribe to.

    Push notification messages are sent to the relevant channel of a specific communication asset (such as a phone line or voicemail). A channel can be accessed by one user exclusively or be shared by a group of users, or an entire company (global channel).

    For example a user's fax number will be assigned a specific channel. When the user receives a new fax, the server will send a push notification message to this specific channel informing the subscribed user about it. Since most companies only have one fax number, other users (as a group) can be subscribed to this very same channel to receive real time push notifications about incoming faxes.

    • name - the name (practically the number) of the communication asset.

    • type - the type of communication asset. For example phone_line, voicemail, fax, or sms_line.

    • owner - a true value indicates the asset is owned (registered to) the user. For example a company's general mailbox is owned by its managing administrator. It can be accessed by other company users, who are not registered as owners.

    • channel - the channel that will be used to send or receive push notifications to and from the communication asset.

Parameters


You have to submit the device UUID in the body of the request to receive your your auto key.


The UUID can be obtained from the presence window of the PubNub Developer Console.


Example


To have a user granted with access to push notifications and associated channels use this syntax:


HTTPS method: Post


Header


webserv.telebroad.com/api/teleconsole/rest/push/login


Body 


{"uuid":"4E57403C-E560-4D99-94CB-9AFE3F6AF090"} 


Response:


{"error":null,

    "result":

        {"uuid":"4E57403C-E560-4D99-94CB-9AFE3F6AF090",

        "subcribe_key":"sub-c-57712b5e-05ae-11e4-aac6-

        02ee2ddab7fe",

        "publish_key":"pub-c-82403925-3c5f-466f-

        a67b8faef7d9492d",

        "auto":"auth-c-14290a9a-1dafe6-711a81-0b8a6493",

        "chat":"private_chat_1b4451364f4ba6cdf

        a069dfacae3e3de",

        "channels":

            [{"name":"2401240",

            "type":"phone_line",

            "channel":"pbx_fc03d619b156f09087

            e6047a302a4c8e",

            {"name":"2401240",

            "type":"voicemail",

            "owner":true,

            "channel":"voicemail_1532_fc03d619b156

            f09087e6047a302a4c8e"},

            {"name":"3204401220",

            "type":"fax",

            "owner":true,

            "channel":"fax_1532_fbc688912ae85b

            27231e5497a4d338a6"},

            {"name":"3204401227",

            "type":"sms_line",

            "channel":"sms_7c36a26d832e84cef

            020cb6fe703935b"},    

            {"name":"3204401228",

            "type":"sms_line",

            "channel":"sms_5baa5533bfbe999280

            1e2dbb41615b3c"}

        ]

    }

}