Can't send image attachment to an agent using Virtual Agent API

Tamer1
Kilo Contributor

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": "..."
}
}

 

8 REPLIES 8

Isaac Vicentini
Mega Sage
Mega Sage

Hi Tamer,

 

Have you found a solution? I have the same problem.


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

Hi Isaac,

Unfortunately not yet 😞

Tamer1
Kilo Contributor

@Shipra any idea?

Abhay8
Kilo Explorer

Hi Isaac, Hi Tamer,

I am facing the same issue on Quebec. 

Can anybody help?

I need to have a solution for this. I am working with a major private bank in India that is currently implementing ServiceNow for IT Service Management.