Can't send image attachment to an agent using Virtual Agent API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2021 04:34 AM
Team,
I'm using Virtual Agent REST API to chat with an Agent using from a custom UI I'm building. When sending an image attachment to the agent, I can see the Agent chat showing this message "We couldn’t download your file using the specified URL. Please check the URL and try uploading again."
Are there any specific whitelisting or configurations I need to enable?
I did test attaching a file using the ServiceNow chat widget, and same image is processed successfully and the agent UI shows the image.
This is the REST Call I'm sending:
{
"method": "POST",
"baseURL": "https://devXXX.service-now.com/api/sn_va_as_service/bot",
"url": "/integration",
"data": {
"requestId": "ab225867-e21e-4128-8a15-9f7891d7e479",
"silentMessage": false,
"botToBot": true,
"clientSessionId": "8680465",
"message": {
"typed": false,
"clientMessageId": "69224451-f4e7-47d5-982e-e1d11943f2b9",
"attachment": {
"clientAttachmentId": "96220f99-2fe7-4295-8ab5-16a16ad40819",
"contentType": "image/jpeg",
"fileName": "image file",
"url": "https://file-examples-com.github.io/uploads/2017/10/file_example_JPG_100kB.jpg"
}
},
"userId": "8680465",
"clientVariables": {
"botUser": {
"userId": "8680465",
"channelName": "System_Global_Test"
}
},
"contextVariables": {}
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
},
"auth": {
"username": "...",
"password": "..."
}
}
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2021 04:45 AM
Team any update on this? it was working perfectly fine in Paris release, but not with Quebec !!! should I assume this is no longer supported?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2021 04:40 PM
Hi Tamer - While uploading attachment from a public url, we will need the URL domain to be specified in the sys_cs_provider associated with your VA API implementation. This was introduced in Quebec to make the attachment upload more secure. Please refer to the Rom e documentation here for attachment upload - https://docs.servicenow.com/bundle/rome-application-development/page/integrate/inbound-rest/concept/bot-api.html
I realize that the documentation has not yet back-ported. Will check the ETA on that but in the meanwhile, please refer to the link above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2021 11:48 PM
Get the same issue on Rome, but on Paris file attachment doesn't work also and nothing in Agent chat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2022 06:13 AM
Hi, were you able to achieve this? I'm working on a similar requirement