cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAI how to handle images in chat?

j_menegari
Explorer
0 Kudos

My bot is connected with Telegram and I like to retrive the images sent to the bot by the chat. I tried with the "source" field but the bot doesn't recognize sending an image as a message (I don't see it in the "Monitor" section) so I can't use it.

Accepted Solutions (1)

Accepted Solutions (1)

former_member330246
Active Contributor

Jacopo,

a question: did you check the SAP CAI API reference docs?

https://cai.tools.sap/docs/api-reference/

Check this link and inform if it help you or you still with doubt.

Thank you, Fausto Motter

Answers (1)

Answers (1)

former_member616825
Participant

Hi, if you want to retrieve the image as our bot connector does not support images you need to use the redirect URL of the bot connector within the settings of your bot to retrieve the payload of the channel and parse it and use it. Then you need to manually make a POST onto our API /dialog to use the builder.

j_menegari
Explorer
0 Kudos

Thanks, just 2 more question:

  • the Bot URL Connector must be in a specific format to be used? Cause I tried with the default one but it doesn't work
  • which is the URL to POST in the builder? The body of the request must be formatted in a specific way?
former_member616825
Participant
0 Kudos

hi j_menegari

1) You need to have your own URL which points to your backend.

2) The URL to POST to the builder is this one: https://cai.tools.sap/docs/api-reference/#dialog-endpoints

martin_donadio
Employee
Employee
0 Kudos

Hi Pierre-Edouard LIEB,

If we point the Bot Connector to a custom backend, and this custom backend posts to the Bot Builder.

How should we carry the reply?

Does the Bot Builder replies to the Bot Connector ? Or does the Bot Builder replies to the custom backend and this one replies to the Bot Connector?

Thanks !

Martin