07-29-2024 05:42 PM
How to attach multiple files with a message while sending the message from the bot to a user. I checked https://developer.webex.com/docs/basics#message-attachments but couldn't find any info. Also, I tried sending multiple files in the same message but it failed. I am using Rest API in python
Please advice.
Solved! Go to Solution.
07-29-2024 10:55 PM - edited 07-29-2024 10:55 PM
Hello @manichou,
At this moment, you can't send multiple file attachments while sending a message through /create-a-message API.
This API is currently not configured to handle multiple file attachments in a single request, even if you try - it'd fail with a "400/Bad Request" error.
And the same has been documented in the attached screenshot as well.
Please let us know for any further assistance.
Regards!
Sandip
Please Note: If you think the solution provided above was helpful and satisfactory, please accept it as a Solution! However if you want to discuss it further and get yourself unblocked, please don't hesitate to reply back on this thread and we'll try to answer those queries by the soonest. In that case, once all of your queries are cleared - finally you can mark it as "Accepted as Solution"
07-30-2024 02:16 PM
@manichou try with the official python api
The sample above sends a message, in the official python documentation section (create a message to be specific), there you can add the attachments=[strpathofattach1, strpathofattach2] list parameter to the create method and include the attachments in a single message
https://webexteamssdk.readthedocs.io/en/latest/user/api.html
07-29-2024 10:55 PM - edited 07-29-2024 10:55 PM
Hello @manichou,
At this moment, you can't send multiple file attachments while sending a message through /create-a-message API.
This API is currently not configured to handle multiple file attachments in a single request, even if you try - it'd fail with a "400/Bad Request" error.
And the same has been documented in the attached screenshot as well.
Please let us know for any further assistance.
Regards!
Sandip
Please Note: If you think the solution provided above was helpful and satisfactory, please accept it as a Solution! However if you want to discuss it further and get yourself unblocked, please don't hesitate to reply back on this thread and we'll try to answer those queries by the soonest. In that case, once all of your queries are cleared - finally you can mark it as "Accepted as Solution"
07-30-2024 03:03 AM
Thanks @sandiban
07-30-2024 08:31 PM
Most welcome @manichou !
Please let us know in case of any further queries.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide