Message API
This is a guide on how you can use Orimon message API to embed our responses into you own applications!
Last updated
Was this helpful?
This is a guide on how you can use Orimon message API to embed our responses into you own applications!
Last updated
Was this helpful?
The Orimon Message API allows you to interact with your chat-bots using a POST
request.
This header will include a secret API key from your Orimon Dashboard to verify its you making the request. Click for a step-by-step guide on how to generate this key.
This header describes the format in which the request will be made.
Example :
Indicates that you are making a call to our "Message" API
psid
: is short for platform_session_id which is a unique identifier, and ideally should be unique per user (user here is the end user who’ll converse with the API). Its value should be 'some_random_value' + '_' + tenantId
.
sender
: has the fixed value "user"
as the message is being sent from user, for a response from the chat-bot.
platformName
: has the fixed value of "web"
, signifying that you are using the web API to get a response.
id
: some unique identifier for every input that comes from user.
type
: this signifies the type of input that your bot is receiving from the user. Currently fixed to "text"
.
payload
: The actual input that the bot will receive. The text
key inside this object will include the user message. This will be a string value.
Example :
The API response will be a JSON object with the following structure:
chatLogId
: This is a system generated id for the specific query from user and the response from your bot and can be used to identify the same.
sessionId
: This is a system generated id for the entire session that take place between your user and your bot and can be used to identify the same.
payload
: This is the actual response and contains 2 values "text"
and an array "buttons"
. The "text"
contains a string value which is the raw text response of your chat-bot and the "buttons"
key contains an array of button options, if any buttons were configured at the specific input that the user has provided.
If there are any errors during the API request, appropriate HTTP status codes will be returned along with error messages in the response body. You can handle these errors accordingly in your application.
That's it! You should now be able to message a chat-bot using the Orimon Message API.
tenantId
: This is the unique id of the chat-bot that you want a response from. Click for a guide on how to get "tenantId".