How to import Messages from another platform using Ringotel API

Here is an example call sequence to import messages:

  1. Send message without content to user’s extension and get “sessionid” in response

POST https://shell.ringotel.co/api

{

"method": "message",

"params":{

"orgid": "16287540703457500320",

"from": "123,

"to": "502",

}

“result”: {

"sessionid": "....",

}

 

  1. Send messages with "sessionid", "content" and "timestamp"

  2. Repeat 1 and 2 for each party number

  3. Repeat 1, 2 and 3 for each user

Messages with "sessionid"value are marked as read after importing

"timestamp" field takes a number value in milliseconds since 01.01.1970