nowfloats / ProjectAna

World's first Open Source Conversation Platform which comes with a Graphical Chat Flow Designer and Chat Simulator.
https://www.ana.chat
GNU Lesser General Public License v3.0
245 stars 91 forks source link

API Integration #33

Open saraalmamaria opened 5 years ago

saraalmamaria commented 5 years ago

I have inquire about the API Integration, I have build my Chatbot in Ana application and i want to integrate it with my API HTTP, how i can do that?

majumdartanmay commented 5 years ago

Hi, When you create a new node, double click on the node and go to Node Info

  1. Select node type as ApiCall
  2. Put your desired variable name .
  3. In the API details section, select the API method (as in POST, GET, PUT etc)
  4. In Headers, put Content-Type:application/json
  5. In API url , put your API's url
  6. In the fallback node section, put the ID of a node where you would like to transfer the control , if the API call fails.
  7. Now switch to 'Buttons' from Node Info. ( This is used by ANA to identify whether an API call has been successful or it has failed)
  8. If you want to check whether the API call was successful, put up a appropriate button condition with which , its certain that the API call was successful.