All members of a channel will get the message from FONE API And if one member is offline, the message is queued for delivery.
1 | channel.sendMessage("Draw the owl!") |
1 2 3 4 5 6 | channel.sendMessage("Draw the NSString *message = @"Draw the owl!"; [self.channel.messages sendMessage:message completion:^(foneapiMLResult result) { if (result != foneapiMLResultFailure) { NSLog(@"message sent...%@", result); } }];owl!") |
1 2 3 4 5 6 | let message: foneapiMLMessage = channel.messages.createMessageWithBody("Draw the owl!") channel.messages.sendMessage(message) { result in if result == .Success { print("Message sent %@", result) } } |
1 2 3 4 5 6 7 8 | Message message = messagesObject.createMessage("Draw the owl!"); messagesObject.sendMessage(message, new StatusListener() { @Override public void onSuccess() { logger.e("Successful at sending message."); } }); |
Channels get notifications when new messages are received. Route the events client-side or query for a particular message.
1 | channel.sendMessage("Draw the owl!") |
1 | channel.sendMessage("Draw the owl!") |
1 2 3 4 5 6 7 8 | extension ViewController: foneapiMLIPMessagingClientDelegate { // Called whenever a channel we've joined receives a new message func ipMessagingClient(client: foneapiMLIPMessagingClient!, channel: TMChannel!, messageAdded message: TMMessage!) { print("\(message.author) said: \(message.body)") } } |
1 2 3 4 | @Override public void onMessageAdd(Message message) { System.out.println("message added"); } |
Conveniently stored in the cloud and synced across devices, get instant access to channel history anytime you want.
1 2 3 4 5 6 7 | channel.getMessages(25) .then(function(messages) { for (i=0; i<messages.length; i++) { var message = messages[i]; console.log('Message: ' + message.body); } }); |
1 2 3 4 5 | NSArray *messages = self.channel.messages.allObjects; NSLog(@"joined general channel with the following messages: %@", messages); for (id msg in messages) { NSLog(@"Message:%@", msg); } |
1 2 3 4 | let allMessages = channel.messages.allObjects() for message in allMessages { print("message body: \(message.body)") } |
1 2 3 4 5 6 | Messages messagesObject = channel.getMessages(); Message[] messagesArray = messagesObject.getMessages(); for(int x = 0; x< messagesArray.length; x++) { System.out.println("Message body:" + messagesArray[x]); } |
Get to know when someone is typing through the typing indicator. Establish a manager to process the event.
1 2 3 4 5 6 | // Set up the listener for the typing started Channel event activeChannel.on('typingStarted', function(member) { // Process the member to show typing console.log("typing started for " + member); }); |
1 2 3 | -(void)ipMessagingClient:(foneapiPMessagingClient *)client typingStartedOnChannel:(foneapiMChannel *)channel member:(foneapiMMember *)member { NSLog(@"typing started for %@", member); } |
1 2 3 | func ipMessagingClient:(foneapiPMessagingClient!, channel: foneapiMChannel!, member: iCEMMember { NSLog(@"typing started for %@", member); } |
1 2 3 | public void onTypingStarted(Member member){ System.out.println("typing started for " + member); } |
Use REST APIs to incorporate backend logic to your chat server.
Deliver your message across channels from any user right from your backend.
1 2 3 | var client = new foneapiMLIpMessagingClient(accountSid, authToken); Message message = client.CreateMessage(serviceSid, channelSid, memberSid, body); Console.WriteLine(message); |
1 2 3 4 | final Map<String, String> messageParams = new HashMap<String, String>(); messageParams.put("Body", "MESSAGE"); Message message = channel.getMessages().create(messageParams); System.out.println(message); |
1 2 3 4 5 6 7 | service.channels('CHANNEL_ID').messages('MESSAGE_ID').create({ body: 'MESSAGE' }).then(function(response) { console.log(response); }).fail(function(error) { console.log(error); }); |
1 2 3 4 | $message = $channel->messages->create(array( "body" => "MESSAGE", )); print $message |
1 2 | messages = channel.messages.create(body="MESSAGE") print message |
1 2 3 4 | service = ip_messaging_client.services.get('SERVICE_SID') channel = service.channels.get('CHANNEL_SID') response = channel.messages.create(body:'MESSAGE') puts response |
1 2 3 4 | service = ip_messaging_client.services.get('SERVICE_SID') channel = service.channels.get('CHANNEL_SID') response = channel.messages.create(body:'MESSAGE') puts response |
Get webhooks for every message to enable you to parse keywords and execute intelligent logic.
1 2 3 4 5 6 7 8 9 10 | [HttpPost] public ActionResult IpMsgWebhook(string from, string to, string body, string trigger) { if(trigger == "onMessageSend") { return WebBot.ProcessMessage(from, to, body); } return new HttpStatusCodeResult(200); }channel.messages.create(body:'MESSAGE') puts response |
1 2 3 4 5 6 7 8 9 10 11 12 13 | @WebServlet("/ip-msg-webhook") public class IpmServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { if (request.getParameter("trigger") == "onMessageSend") { String message = request.getParameter("message"); String to = request.getParameter("to"); String from = request.getParameter("from"); processMessage(message, to, from); } response.getWriter().println("received message"); } } |
1 2 3 4 5 6 7 8 9 | app.post('/ip-msg-webhook', function(request, response) { var trigger = request.query.trigger; if (trigger == 'onMessageSend') { sendToWebbot(request, response); } else { response.sendStatus(200); } }); |
1 2 3 4 | if ($_GET['trigger'] == 'onMessageSend') { processMessage($_GET['message'], $_GET['to'], $_GET['from']); } echo "received message"; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | from flask import Flask, request app = Flask(__name__) @app.route("/ip-msg-webhook") def ipm_webhook(): if request.args.get("trigger") == "onMessageSend" message = request.args.get("message") to = request.args.get("to") from_ = request.args.get("from") process_message(message, to, from_) return "received message" if __name__ == "__main__": app.run() |
1 2 3 4 5 6 7 8 | require 'sinatra' get '/ip-msg-webhook' do if params[:trigger] == 'onMessageSend' process_message params[:message], params[:to], params[:from] else "received message" end |
1 2 3 4 5 6 7 8 | # Nothing to see, here's an owl instead. , _ , ( o o ) /'` ' `'\ |'''''''| |\\'''//| """ |
Assign users to a channel through programs. To aid use cases, add a client and an agent in one channel.
1 2 3 | var client = new foneapiMLIpMessagingClient(accountSid, authToken); Member member = client.CreateMember(credentialSid, channelSid, identity, roleSid); Console.WriteLine(member); |
1 2 3 4 | final Map<String, String> memberParams = new HashMap<String, String>(); memberParams.put("Identity", "IDENTITY"); Member member = Channel.getMembers().create(memberParams); System.out.println(member); |
1 2 3 4 5 6 7 | service.channels('CHANNEL_SID').members.create({ identity: "IDENTITY" }).then(function(response) { console.log(response); }).fail(function(error) { console.log(error); }); |
1 2 3 4 | $member = $channel->members.create(array( "identity" => "IDENTITY", )); print $member; |
1 2 3 4 | service = client.services.get(sid="SERVICE_SID") channel = service.channels.get(sid="CHANNEL_SID") member = channel.members.create(identity="IDENTITY") print member |
1 2 3 4 | service = ip_messaging_client.services.get('SERVICE_SID') channel = service.channels.get('CHANNEL_SID') member = channel.members.create(Identity:'IDENTITY') puts member |
1 2 3 | curl -XPOST https://chat.foneapi.com/v1/Services/{service sid}/Channels/{Channel SID}/Members \ -d "Identity=kwhinnery" \ -u '{foneapi account sid}:{foneapi auth token}' |
Automated failover ensures that you have 99.95% uptime SLA without the need for a maintenance window.
Use existing apps to new markets by configuring features for compliance and localization.
Use a single platform for voice, SMS, video, authentication, chat and more.
Get free support, have the freedom to scale your business, market faster with pay-as-you-go.
Explore how texting gives you the edge for your business.
Receive promo updates via email
We’ve got your back. Find immediate solutions 24/7.
Call or Text:
(703) 596 - 8989
Connect to your Facebook Messenger account to receive alerts and talk with us using Facebook Messenger app!
Connect to your Whatsapp account to receive alerts and talk with us using Whatsapp app!
Connect to your Wechat account to receive alerts and talk with us using Wechat app!
Connect to your Viber account to receive alerts and talk with us using Viber app!
Connect to your Yahoo Messenger account to receive alerts and talk with us using Facebook Messenger app!
Connect to your Kakao account to receive alerts and talk with us using Kakao app!
Connect to your Skype account to receive alerts and talk with us using Skype app!
Connect to your Kik Messenger account to receive alerts and talk with us using Kik Messenger app!
Connect to your Hangout account to receive alerts and talk with us using Hangout app!
Connect to your Snapchat account to receive alerts and talk with us using Snapchat app!