Learn to set up an API communication channel for your bot in NLX's Dialog Studio

Create API channel

Easily create an API channel for your bot in the Channels tab:

  • Expand API option

  • Select + Create channel

  • Click Create channel

Optional API fields

Two optional fields are unique to the API channel:

  • API key: Matched against the HTTP headers from the bot

  • Whitelisted domains: Domains authorized to make CORS calls to the API channel (you may need to add variations of your domain with a trailing slash / and without)

Need context on the other fields? See Bots: Channels

Chat SDK & widget configurator

We recommend using our official Chat SDK to set up communication with API channels from within a web frontend. This contains:

  • A vanilla JavaScript function for connecting to a bot, maintaining a conversation, and subscribing to new messages

  • Our React hook to operate inside a React app without providing styling

  • A fully-styled, chat widget that is customizable to fit your style guide

To access the chat widget configurator:

  • Select the Details link next to the build's Deployed status

  • Expand the API section of the modal

  • Click Open chat widget configurator

To use the chat widget configurator, be sure to add https://developers.nlx.ai to the Whitelisted domains section of your API channel setup.

Last updated