MessengerX.io is a developer marketplace for everyday chat apps also known as chatbots.
Our aim to aid developers looking to build and monetize deeply personalized chat experiences.
With our unique learnings in the conversational space from processing over 2.5B+ messages from or to end users.
We would like to claim that we do know a thing or two about making good chatbots :)
We also see an evidential gap between chatbots and end users due to the operating nature of current messaging eco-systems.
We aim to bridge this gap between "great" chatbots and end users!
When a user sends a message to your bot through Platform SDKs integrated inside publisher or partner app(s).
The following set of events sequence should take place when an incoming message is received destined for you bot.
- Our servers would route the incoming messages to Your Webhook or CHAT BOT URL, where your messaging app or chatbot is hosted.
- Using the Send Message API, the mini app or the chat bot can then respond to the person directly on the Partner App via our Platform APIs
The MessengerX Platform is FREE for developers looking to build highly engaging consumer based chatbots.
Chat Apps also called as Chat Bots are functional conversational programs that one can chat with to carry on a series of complicated tasks in a quick fashion.
Signup and Get a FREE API Token @ https://portal.messengerx.io
You can place Webhook and Image Url as None till deployment of your Chat App to get started.
Webhook is a REST endpoint url which denotes your custom functions / callbacks.
This is the end point which will receive any incoming messages destined for your bot.
A message payload is a JSON representation of an incoming message sent by the end user.
The incoming messages that your webhook will receive are encrypted using HS512 algorithm with your token as the key.
Below is the JSON representation of the raw incoming message.
{"raw":"eyJhbGciOiJIUziJ9.===jsY8eeeru2i1vcsJQ....."}
Decrypt the incoming payload with the secret_key provided.
You can use the open source JWT.io libraries available for all major programming languages
Let's quickly go through the sample representation of the decrypted incoming message object payload
- messaging: list of incoming message actions
- message_data: details about the nature of data sent.
- user: basic user info details about the user associated with the message.
- sender: the unique device id of the user.
- client: the partner app client id.
- version: android / web sdk client version
- silent: if silent is true, don't reply back to the request.
{ "sub":{ "messaging":[ { "message_data":{ "text":"hi", "action_type":"get_started" }, "user":{ "userId":"<!-- USER_ID -->", "creation_time":1589518339556, "device_id":"311b145ed6a96d6", "email":"<c11b145ed6a96d6>@machaao.com", "timezone":"-7.0" }, "sender":"dWnjre9rTr65ZeiOmrY1oU", "silent":false, "client":"messenger.---.debug", "version":"0.838" } ] } }
Send a outgoing message in response to user's input can be done by the usage of our On Demand Messaging APIs as demonstrated below
Below is an example CURL request to send a message / response to a particular user id using our Core Messaging APIs.
curl --location --request POST 'https://ganglia.machaao.com/v1/messages/send' \ --header 'api_token: API_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "users":["<!--- UNIQUE_USER_ID -->"], "message":{ "text": "I am a good bot", "quick_replies": [{ "content_type": "text", "title": "Hi", "payload": "hi" }] } }'
Below is an example CURL request to send a message / response to a particular user id using our Core Messaging APIs.
curl --location --request POST 'https://ganglia.machaao.com/v1/messages/send' \ --header 'api_token: API_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "users":["<!--- UNIQUE_USER_ID -->"], "message":{ "attachment":{ "type":"template", "payload":{ "template_type": "button", "text": "Hi, I am a good bot...!", "buttons": [{ "title": "Hi", "type": "postback", "payload": "hi" }, { "title": "Source", "type": "web_url", "url": "https://provogue.s3.amazonaws.com/provogue-duffle1.jpg" }] } }, "quick_replies": [{ "content_type": "text", "title": "Hi", "payload": "hi" }] } }'
Below is an example CURL request to send a message attachment to a particular user id.
curl --location --request POST 'https://ganglia.machaao.com/v1/messages/send' \ --header 'api_token: API_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "users":["<!-- UNIQUE_USER_ID -->"], "message":{ "attachment":{ "type":"template", "payload":{ "template_type":"generic", "elements":[ { "title": "Test #786 - Duffle Bag + 200 Machaao Credits", "subtitle":"Only Pay Shipping & Handling Charges. Combo Offer for Machaao Users only.", "image_url":"https://provogue.s3.amazonaws.com/provogue-duffle1.jpg" } ] } }, "quick_replies": [{ "content_type": "text", "title": "Hi", "payload": "hi" }] } }'
Below is an example CURL request to send a message attachment to a particular user id with buttons.
curl --location --request POST 'https://ganglia.machaao.com/v1/messages/send' \ --header 'api_token: API_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "users":["<!-- UNIQUE_USER_ID -->"], "message":{ "attachment":{ "type":"template", "payload":{ "template_type":"generic", "elements":[ { "title": "Test #786 - Duffle Bag + 200 Machaao Credits", "subtitle":"Only Pay Shipping & Handling Charges. Combo Offer for Machaao Users only.", "image_url":"https://provogue.s3.amazonaws.com/provogue-duffle1.jpg", "buttons": [{ "title": "Hi", "type": "postback", "payload": "hi" }, { "title": "Source", "type": "web_url", "url": "https://provogue.s3.amazonaws.com/provogue-duffle1.jpg" }] } ] } }, "quick_replies": [{ "content_type": "text", "title": "Hi", "payload": "hi" }] } }'
Below is an example CURL request to send a message attachment to a particular user id with buttons.
curl --location --request POST 'https://ganglia.machaao.com/v1/messages/send' \ --header 'api_token: API_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "users":["<!-- UNIQUE_USER_ID -->"], "message":{ "attachment":{ "type":"template", "payload":{ "template_type":"generic", "elements":[ { "title": "Test #786 - Duffle Bag + 200 Machaao Credits", "subtitle":"Only Pay Shipping & Handling Charges. Combo Offer for Machaao Users only.", "image_url":"https://provogue.s3.amazonaws.com/provogue-duffle1.jpg", "buttons": [{ "title": "Hi", "type": "postback", "payload": "hi" }, { "title": "Source", "type": "web_url", "url": "https://provogue.s3.amazonaws.com/provogue-duffle1.jpg" }] }, { "title": "Test #787 - Duffle Bag + 200 Machaao Credits", "subtitle":"Only Pay Shipping & Handling Charges. Combo Offer for Machaao Users only.", "image_url":"https://provogue.s3.amazonaws.com/provogue-duffle1.jpg", "buttons": [{ "title": "Hi", "type": "postback", "payload": "hi" }, { "title": "Source", "type": "web_url", "url": "https://provogue.s3.amazonaws.com/provogue-duffle1.jpg" }] } ] } }, "quick_replies": [{ "content_type": "text", "title": "Hi", "payload": "hi" }] } }'
The personalization and engagement api is the core base to build sophisticated re-engaging bots.
The process starts with tagging a user, Tagging a user allows you to open up multiple re-targeting or re-engagement use cases such as sending daily news, personalized responses, etc.
This opens up your chat bot to support variety of deeply personalized use cases without a need for a huge dev ops team.
Annotate or Tag a user with values for deeper personalization.
curl --location --request POST 'https://ganglia.machaao.com/v1/users/tag/<USER_ID>' \ --header 'api_token: <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data-raw '{ "tag": "preferred_languages", "status": 1, "values": ["en", "fr"], "displayName": "Languages" }'
Un-tag a user for deeper personalization.
curl --location --request POST 'https://ganglia.machaao.com/v1/users/tag/<USER_ID>' \ --header 'api_token: <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data-raw '{ "tag": "preferred_languages", "status": 0 }'
Get all the tags for deeper personalization use cases.
curl --location --request GET 'https://ganglia.machaao.com/v1/users/tags/<USER_ID>' \ --header 'api_token: <API_TOKEN>' \ --header 'Content-Type: application/json'
Sending announcements in order to re-engage your bot user (rate limited to a max of 1 per hour per user)
Below is an example CURL request to send an announcement to a particular tag or list of tags using our Announcement APIs.
curl --location --request POST 'https://ganglia.machaao.com/v1/messages/announce' \ --header 'api_token: API_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "tags":["india", "pakistan", "usa"], "message":{ "text": "I am a good bot", "quick_replies": [{ "content_type": "text", "title": "Hi", "payload": "hi" }] } }'
Below are some samples which will help get you started https://github.com/machaao/machaao-samples
https://github.com/machaao/gpt-3-chatbot
In addition to the massive savings on marketing and infrastructure costs, the platform also offers multiple other Rest APIs dor developers looking to build deeply personalized chatbots:
- Rich Messaging Support via On Demand Messaging API
- Deep Personalization via Tagging API
- Auto ML based Engagement via Announcement API
- Data Capture API (Subjected to Approval)
- Transactional Wallet API (Subjected to Approval)
- FREE Hosting for your chat bot (Subjected to Approval)
- Guaranteed Message Processing (Subjected to Approval)
- Admin Dashboard (Premium)
Jeanie - Your AI Girlfriend
Built using GPT-J + MACHAAO Platform
https://github.com/machaao/gpt-j-chatbot
Al-x by OpenExo
Check out https://www.messengerx.io/jeanie for a web demo