Try to send attachment by Virtual Agent API failed. Not show on the chat dialog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I'm attempting to utilize this API for sending both text messages and attachments to the chat.
I'm able to send text messages successfully. However, when I attempt to send text with an attachment, only the text appears in the dialog. The attachment doesn't show up, even though I've added the trusted domain according to the wiki
Here is the request content in postman, and trust domain add to channel identifier is: ngrok-free.app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Raycccc - It looks like you've forgotten to post the request body.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've tested the following payloads, but unfortunately neither of them worked
{
"clientSessionId": "rZO6VSUDTteBlCttL1iGpg",
"requestId": "rZO6VSUDTteBlCttL1iGpg",
"botToBot": true,
"action": "AGENT",
"emailId": "sn@ray.com",
"message": {
"typed": true,
"clientMessageId": "{{$random.uuid}}",
"attachment": [
{
"clientAttachmentId": "{{$random.uuid}}",
"contentType": "image/jpeg",
"fileName": "five9.jpg",
"url": "https://somnambulistic-leonie-ungloomily.ngrok-free.app/file/MipEuBuNSluveKZASHf1sQ?filename=five9.jpg&jwt=eyJhbGciOiJFUzI1NiIsI***Te4rvh8u8zv_K6E7vCAcqRueW_6harzqlOSM_IHOgkafbxlnAOlmg8VA1i2vA"
}
],
"text": "five9.jpg"
},
"userId": "RByQjIr_Qaa-DC2ExwyagA"
}{
"clientSessionId": "rZO6VSUDTteBlCttL1iGpg",
"requestId": "rZO6VSUDTteBlCttL1iGpg",
"botToBot": true,
"action": "AGENT",
"emailId": "sn@ray.com",
"message": {
"typed": true,
"clientMessageId": "{{$random.uuid}}",
"attachment":
{
"clientAttachmentId": "{{$random.uuid}}",
"contentType": "image/jpeg",
"fileName": "five9.jpg",
"url": "https://somnambulistic-leonie-ungloomily.ngrok-free.app/file/MipEuBuNSluveKZASHf1sQ?filename=five9.jpg&jwt=eyJhbG****WHMJnEuVBEtITe4rvh8u8zv_K6E7vCAcqRueW_6harzqlOSM_IHOgkafbxlnAOlmg8VA1i2vA"
}
,
"text": "five9.jpg"
},
"userId": "RByQjIr_Qaa-DC2ExwyagA"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
{
"clientSessionId": "rZO6VSUDTteBlCttL1iGpg",
"requestId": "rZO6VSUDTteBlCttL1iGpg",
"botToBot": true,
"action": "AGENT",
"emailId": "sn@ray.com",
"message": {
"typed": true,
"clientMessageId": "{{$random.uuid}}",
"attachment":
{
"clientAttachmentId": "{{$random.uuid}}",
"contentType": "image/jpeg",
"fileName": "five9.jpg",
"url": "https://somnambulistic-leonie-ungloomily.ngrok-free.app/file/MipEuBuNSluveKZASHf1sQ?filename=five9.jpg&jwt=eyJhbGciOiJFUzI1NiIsImsiOiJLSzQxYXo3LyJ9.eyJpc3MiOiJmaWxlIiwiYXVkIjoiemZzIiwiaWF0IjoxNzYzNjA2NTk4LCJleHAiOjE3NjM4NjU3OTgsImRpZyI6IjJiOGU3ZDc2YjE3MDJkY2ViM2JjY2JkYjc1MjRlZjc2YWNmMjEyMGZjNmRjZWI0ODkxZDBjMDBmNmI5OGRjNzEiLCJoZGlnIjpmYWxzZSwib3JpIjoiemVjb2NoYXQiLCJpaWMiOiJkZXYifQ.Bco30LrVQd_mDWHMJnEuVBEtITe4rvh8u8zv_K6E7vCAcqRueW_6harzqlOSM_IHOgkafbxlnAOlmg8VA1i2vA"
}
,
"text": "five9.jpg"
},
"userId": "RByQjIr_Qaa-DC2ExwyagA"
}
{
"clientSessionId": "rZO6VSUDTteBlCttL1iGpg",
"requestId": "rZO6VSUDTteBlCttL1iGpg",
"botToBot": true,
"action": "AGENT",
"emailId": "sn@ray.com",
"message": {
"typed": true,
"clientMessageId": "{{$random.uuid}}",
"attachment": [
{
"clientAttachmentId": "{{$random.uuid}}",
"contentType": "image/jpeg",
"fileName": "five9.jpg",
"url": "https://somnambulistic-leonie-ungloomily.ngrok-free.app/file/MipEuBuNSluveKZASHf1sQ?filename=five9.jpg&jwt=eyJhbGciOiJFU***fbxlnAOlmg8VA1i2vA"
}
],
"text": "five9.jpg"
},
"userId": "RByQjIr_Qaa-DC2ExwyagA"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
