m-chat
Status
  • 👋Welcome!
  • 🏁 Getting Started
    • Building a chatbot
    • Testing a chatbot
    • Publishing your bot
      • Web
        • Embed chatbots on website
      • WhatsApp
        • Meta
        • 360Dialog
        • GupShup
        • Twillo
        • TechAlpha
      • Instagram
      • Facebook Messenger
      • SMS
      • Mobile App
    • Utility Tools
    • Contacts
      • Scheduling a Contact Report
      • Exporting a Contact List
    • Chatbot Appearance
      • Custom CSS
      • Image dimensions
      • Pop-up messages
  • BOT BUILDER
    • Action blocks
      • Trigger
      • Send message
      • Collect input
      • Buttons
      • Reply buttons
      • Carousel
      • Answer AI
      • Set AI
      • List
      • Send an email
      • Condition
      • Dynamic data
      • Talk to human
      • Javascript
      • Webhook
      • Jump
      • Flow
      • Options
      • Collect file
      • Form
      • Calendar
      • Delay
      • Codeblock
      • Slider
      • Image gallery
      • Send WhatsApp
      • Send SMS
      • Send Email
      • Send Status
      • WhatsApp flow
      • Catalogue
    • Outbound bots
      • Building Ongoing Campaign
      • Building One Off Campaign
    • Variables
    • Cloning bots
    • Connecting action blocks
    • Creating a loop
  • ✨ AI STUDIO
    • Building a GPT chatbot
    • Knowledge base
    • Custom Answers
    • Functional call
    • Prompts
    • Tokens
    • Refresh frequency
  • 💬 LIVE CHAT
    • Overview
    • Building a bot with live chat
    • Creating views
    • Adding Labels
    • Saved replies
    • Settings
  • 🔗 Integrations
    • HTTP request
    • Events
  • 💬 WhatsApp Business API
    • Getting a WhatsApp API
      • Getting WhatsApp API (Old approach)
      • Sandbox WhatsApp API
    • Facebook Business Manager (FBM) Verification
    • Creating a WhatsApp Template
    • Cost
    • Messaging Limits, Quality Rating
    • Official Business Account (Green tick verification)
  • 📊 Reporting
    • Chatbot Analytics
    • Agent Analytics
    • Outbound analytics
    • Link analytics
    • Weekly email report
  • 🛠️ Troubleshooting
    • Getting notification for leads
    • JS functions to trigger chat widget
    • Setting up link tracking
    • How do I hard refresh my browser?
    • Notifications
    • Tracking Facebook Pixel
    • Inviting teammates
    • Teams
  • 🧑‍💻 Support
    • Creating a ticket
    • Book a demo
    • Purchase a subscription
    • Cancelling a subscription
    • Refund policy
    • Reset Password
    • Deleting account
Powered by GitBook
On this page
  • Request
  • Methods
  • Endpoint URL
  • Headers
  • Body
  • Response
  • Testing API request
  1. 🔗 Integrations

HTTP request

Performs an HTTP request with a third-party app's REST API endpoint.

If you want to send data or fetch data from a third-party that m-chat does not have a native integration to, you can use the HTTP request action block.

HTTP request allows you to invoke a API endpoint and perform a GET / POST / PUT operation.

Request

Configure the details for your API request.

Methods

Choose the method of your API endpoint you want to invoke. m-chat supports:

  • GET

  • POST

  • PUT

Endpoint URL

You must provide the absolute URL, i.e., a URL starting with HTTP or HTTPS.

You can also use the variables in the URL by typing '#', as some APIs do not have headers and mention everything in the URL itself.

Copy

https://api.weatherapi.com/v1/current.json?key=e943b863ebed4572b55140350200312&q=#city#

Here in the above URL #city# is the variable that has been used

Headers

Add authentication data to the HTTP request. Commonly used for bearer token based authentication.

Make sure you add the content-type field to your request.

Body

Add the required information you want to send as part of your request.

You can send information in two ways:

Raw:

It is normal JSON format in which the request needs to be passed

Form:

It allows you to map the fields. You can either provide static value or map the variables

Response

When the HTTP request is made, you will receive a response from the API.

You can store the objects received from the API into variables by mapping the fields.

// Object path for storing the response into variable where list is returned

result.data.list[0].id

// Here the value of the field `id` will be stored in the variable mapped to it.
// Object path for storing the response into variable where single value is returned

result.data.id 

// Here the value of the field 'id' will be stored in the variable mapped to it.

Testing API request

Once you have configured your API request, you can click on the 'Test the API' button and see the response received.

From the response screen, you can directly save the object into a variable by clicking on the + icon.

PreviousSettingsNextEvents

Last updated 6 months ago