file
To send files in a chat, use the file
reply type.
Properties
Property | Type | Required | Description |
---|---|---|---|
fileUrl |
String | Yes | File URL. |
fileName |
String | No | File name. |
mimeType |
String | No | File media type. |
Syntax
{
"type": "file",
"fileUrl": "https://example.com/file.xlsx",
"fileName": "file.xlsx",
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
Channel restrictions
file
is only supported in the following channels:
- Chat API
- Chat widget
- edna.chatCenter
- edna WhatsApp
- Webim (External Bot API 2.0)
How to use
state: SendManual
a: To configure the service, follow the steps described in the instruction below.
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "file",
"fileUrl": "https://example.com/manual.pdf",
"fileName": "manual.pdf",
"mimeType": "application/pdf"
});