Get/sms/conversation

Note the distinction between this and get/sms/conversations that get details for all conversations of a phone line. 


The get/sms/conversation method returns details about a particular SMS conversation for a  telephone line, displaying all the messages exchanged in the conversation. The response has the following fields of information:


  • ID- the ID of each message in the conversation. 
  • new -  value of 1 indicates new message and a value of  0 indicates an old one.
  • direction - the direction traveled by the messages. Either "in" or "out". Blank indicates both directions.
  • sender - name of the sender of the message.
  • receiver - name of the receiver of the message.
  • time - the time the message was sent or received in Unix time stamp format.
  • msgdata - the actual content of an SMS message.


Parameters


Parameter
Type
Operation
sms_line
string
The SMS  line from which the list if conversations are requested.
conversation
string The ID for the conversation for which the detailes are requested - usually this is the other party's number.
 
You obtain this ID using the get_sms_conversations method.


Example


To get the details of conversation for SMS line 646-741-5360 with party with the number 1-917-580-4880 use this syntax:


webserv.telebroad.com/api/teleconsole/rest/sms/conversation?sms_line=16467415360&conversation=19175804880


Result:


.

.

.

    {

        "error":null,

        "result":[{"id":"2159239",
        "new":"0",
        "direction":"in",
        "sender":"19175804880",
        "receiver":"16467415360",
        "time":"1500545016",
        "msgdata":"Hi, I got the report.",
        "sent_by":null,
        "read_by":"",
        "seen":"0"
        },{"id":"2159236",
        "new":"0",
        "direction":"in",
        "sender":"19175804880",
        "receiver":"16467415360",
        "time":"1500544816",
        "msgdata":"Would like to discuss the details",
        "sent_by":null,
        "read_by":"",
        "seen":"0"
        },{"id":"2149875",
        "new":"0",
        "direction":"out",
        "sender":"16467415360",
        "receiver":"19175804880",
        "time":"1500369461",
        "msgdata":"What time is good for you?",
        "sent_by":"13697",
        "read_by":"",
        "seen":"0"
    }]

    }{

        "error":null,

        "result":[{"id":"2159239",
        "new":"0",
        "direction":"in",
        "sender":"19177414880",
        "receiver":"16467415360",
        "time":"1500545016",4
        "msgdata":"Tommorow 11am?",
        "sent_by":null,
        "read_by":"",
        "seen":"0"
     }
     }]

}


Did you find it helpful? Yes No

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