Send message attachments and save chat session

Hello Support team. We want to use the FlashPhoner API to send files. Also, we want to save the chat history, so when user go back to the chat box can read last conversation.
Does the sendMessage method supports file attachments?
What is the best way you recomment to save the chat history?

Thanks for your answer


Staff member
Atthachments are not currently supported out of the box.
Sure you can try to attach a file and encode it as a text, for example using Base64 then unpack this text on receiver side.
The best way to keep message history is to keep them on your Web server.
To do that you can use REST API hooks.
Please checkout logs/flashphoner_manager.log
  "nodeId" : "Py2df9UPvS0wTxPYiP81MvaNE0dpcjIV@",
  "appKey" : "defaultApp",
  "sessionId" : "/",
  "id" : "c99ee3e0-c45a-42e5",
  "from" : "10007",
  "to" : "10001",
  "contentType" : "text/plain",
  "isImdnRequired" : false,
  "body" : "Hey"
Therefore you will need your REST application which receives this HTTP/REST request and saves message info in database.
So you will able to save message history. Then you can fetch this information from your database on user connection.
You can also try to keep the history in cookies, but I'm not sure if cookies allow to keep large amount of data.
Here is application management docs.
Here is messaging call flow.