Guide FloatChat

Floatchat- User Guid

Json API

Introduction #

 

Floatchat provides a robust capability to integrate with any system using REST APIs with JSON as the data exchange format. JSON (JavaScript Object Notation) is widely used for data interchange on the web. With the JSON API integration in Floatchat, you can easily integrate with other CRMs and databases.

In this example, we are using a JSON-based API to fetch data. The data retrieved from the API response is stored in a new attribute, which can be displayed to the end-user.

Methods #

 

– GET: Used to read data

– POST: Used to update data

– PUT: Used to write or update data

– DELETE: Used to delete data

 

For POST and PUT methods, you can use the JSON API node in Floatchat to make API requests for updating or writing data. The JSON data should be added in the Body field.

 

Params #

The Params tab allows you to edit the data required for URL parameters. When adding key-value pairs, the JSON API Plugin automatically combines them with the URL during the API call. The parameter value can be entered by the user or predefined by the bot admin. To pass parameters from the user’s side, you can save the user input as an attribute in the bot and access it in the JSON API node by typing “{” in the Params value field.

 

Headers #

You can add headers to your API request, which can be user-entered data or predefined by the bot admin. Headers can include authentication tokens, app secrets, passwords, and other credentials required by the endpoint.

 

Authentication #

The Authentication tab allows you to define identification parameters along with the endpoint. Different types of API authentication are supported:

  1. – Key Based API Authentication
  2. – Basic Authentication
  3. – Token-Based Authentication (Two-Step Authentication)

 

You can select “None” as authentication if no authentication is required, which is the default option.

 

Key Based Auth

For requests that require Key Based API Authentication, you can include the authentication keys or use an already saved token variable in params/headers.

 

Basic Auth

For Basic Authentication, you can enter your username and password. The required “Authorization” header is automatically added to your API request.

 

Token-Based Authentication (Two-Step Authentication)

For Token-Based Authentication, you can enter the token value in the params, header, body, or URL. You can create a path to update the specified authentication tokens in case of authentication failure.

 

Note: The JSON API Node in Floatchat supports API responses received within 5 seconds. If you are using a restricted API in Floatchat, make sure to whitelist the following IPs at the client-side:

  • – IP1: 65.0.229.165
  • – IP2: 15.206.244.196
  • – IP3: 43.205.147.197
  • – IP4: 43.204.196.209
  • – IP5: 43.204.223.141
  • – IP6: 3.111.165.119
  • – IP7: 3.7.76.242
  • – IP8: 3.6.115.228
  • – IP9: 13.126.97.85
  • – IP10: 13.232.96.126
  • – IP11: 65.0.175.128

 

3.Response & Attributes #

The Response Section in Floatchat displays the API response when you hit Send after providing the required Request URL, Params, and other settings for a valid REST API Call. You can click on an object in the API response to create an attribute and show certain messages to the users. Attributes with their values can also be added in the postback.

JSON Response Structure

Floatchat supports interactive responses from your backend server using the JSON API plugin. You can send messages, options

 

What are your feelings
Scroll to Top