Categories
Modules API

API channel configuration

To create an API channel open "Channels" - "API" - click "Add".


After adding a channel, four blocks for adjustment appear on the page:
  • Basic (mandatory) - "API", "Tracking tickets", "Tracking chat";
  • For attachments (optional) - "Attachment settings".
API Block



  • Channel Name - enter the name of the channel that will be displayed in the general list of channels in the "Channels" section;
  • Redirect URL - your webhook to which Usedesk API-channel should send requests when specific events occur on the channels being tracked (you define their list in "Tracking tickets", "Tracking chats" blocks);
  • JSON request - check the box if you want to convert the request into JSON format;
  • Send to UTF-8 - tick the checkbox to send the request in this format;
  • Track Channels - move to the right column those Usedesk channels by which this API-channel should track the events marked by checkboxes in the "Tracking tickets", "Tracking chat" blocks. Leave unneeded channels in the left column. This distinction will reduce the load on the API-channel and get rid of unnecessary data.
Tracking Tickets and Tracking Chat Blocks
Tick the checkboxes for those events where the channel should send requests to your Redirect URL.

After making all changes, click "Save".

After saving, fields appear in the API block:

  • App ID;
  • App secret key is an API token - a channel through which you can work with the API.

Block "Setting up attachments"
Configure file transfer by filling out the following fields:
  • Enable - enable/disable attachment transfer;
  • URL - your webhook to which the Usedesk API channel will send attachments;
  • Work mode - manual. Attachment transfer is not done automatically yet, it is done only manually by the agent;
  • Attachment transfer format - select the format for sending attachments (link/base64);
  • Valid file extensions - list the file extensions that will be accepted by a comma. Empty field - all files except those listed in the "Forbidden file extensions" field will be accepted;
  • Forbidden file extensions - comma-list file extensions that won't be accepted. Empty field - all files will be accepted unless others are listed in the "Allowed file extensions" field;
  • Prevent attachments types;
  • Basic authorization;
  • Login;
  • Password;
  • Attachment types - add attachment types that will automatically be assigned an ID so that the request will pass an ID of the type, not the attachment names. When transmitting the desired attachment type, the agent will be able to select one of the attachment types from the drop-down list;
  • Channels - allow attachments to be passed through a certain channel. Important: One channel can only be selected in one channel API for attachments, i.e. if two API channels are created and one already has a channel selected, the same channel cannot be selected in the second API channel.



If the channel to which the appeal has come is connected to some API channel for transmitting attachments; the "Send to CRM" button is displayed next to the "Download" button in the preview mode.

When you send an attachment, a notification will appear in the upper right corner:

  • "Investment successfully transferred" (green) is a success;
  • The text of the error (red), for example: "Incorrect answer from the server" is not a success.

The user manually selects the files to be transferred and presses the "Send to CRM" button.

The answer is returned in JSON format: {success:true} and {sucess:false}. Any other answer is considered an error.

Was the article helpful?

Yes No