Chat API: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 36: Line 36:
   
   


Calls from third-party systems to Planfix:
'''Calls from third-party systems to Planfix:'''


●      Calls must be sent to the address specified in the integration settings to receive notifications.
*Calls must be sent to the address specified in the integration settings to receive notifications.
 
*The special key must always be passed in the body of the request, in the "token" field.
●      The special key must always be passed in the body of the request, in the "token" field.
*Requests are passed in the format application/x-www-form-urlencoded
 
●      Requests are passed in the format application/x-www-form-urlencoded


   
   

Revision as of 18:04, 22 June 2019

API Overview

APIs let you link any of your chats or similar systems (communication threads with users) to Planfix


Integrating Planfix and third-party chats lets you do the following:

  • receive messages from third-party systems in Planfix, as well as data about contacts from these systems, in real time;
  • receive responses from Planfix in third-party systems, in real time.


The integration must be two-way. Planfix sends requests to the third-party system's specified entry points, while the third-party system sends other requests to Planfix's single entry point.


The exchange happens over HTTPS. Authorization is done through an address from Planfix or the third-party system, and the authorization key received when setting up the integration.


How authorization and communication work

HTTPS:

  • Calls to Planfix are accepted only over HTTPS. This ensures that the systems can securely communicate over the Internet.
  • To keep your data secure, please use HTTPS to receive calls in your system as well.


Key (token):

  • In addition, a special key (token) is used to authorize each call to Planfix. You can get it in the integration settings.
  • Please use a key (token) to accept calls in your system as well. Generate a key and enter it in the corresponding field in the integration settings section.
  • Keys are created one time, when configuring the integration. You can replace the key on your end as needed and update it in Planfix.


Calls from third-party systems to Planfix:

  • Calls must be sent to the address specified in the integration settings to receive notifications.
  • The special key must always be passed in the body of the request, in the "token" field.
  • Requests are passed in the format application/x-www-form-urlencoded


Calls from Planfix to third-party systems:

● Planfix will send all calls to the address specified in the integration settings.

● Planfix will pass the key (token) that you specify in your settings in the body of the call.

● Requests are passed in the format application/x-www-form-urlencoded


Responses

● Planfix sends all responses to calls from third-party systems in JSON format in the body of the response.

● Third-party systems must send all responses to Planfix calls in JSON format in the body of the response.