POST/push/login

Function


The POST/push/login method grants a user with access to real time push notifications of voicemails , SMS messages,  faxes and call history,  based on his provided 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.  


 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 need 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 need 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 need 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 administrator abilities using the PubNub Access Manager dashboard, extending their abilities to create and control secure real time data streams.
  • chat - The user's specific Telebroad channel for exchanging chat messages in the Teleconsole. This is completely separate from the PubNub channels described next.

  • 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 channels can be accessed by one user exclusively or be shared by a group or 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


There aren't any required parameters in either the header or the body of the request.


Example


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


HTTP method: Post


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


Result:


{"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",

        "auth":"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"}

        ]

    }

}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.