Unable to send image in freshchat using conversation api

Hi Team,
Hope you guys are doing well.
I have a requirement where i need to post an image in Freshchat conversation. I had implemented this before and was working fine but now i am getting an 500 internal server error.
The API seems to be working with text content.
Please refer the code snippet below :
URL : https://domain.freshchat.com/v2/conversations
Method : POST
Request Body :

{
"app_id": "xxxxxxxxxxxxxxxxx",
"channel_id": "xxxxxxxxxxxxxxa59cf00",
"status": "new",
"users": [
    {
        "id": "xxxxxxxxxxxf04d15662f95"
    }
],
"messages": [
    {
        "actor_type": "user",
        "message_type": "normal",
        "actor_id": "xxxxxxxxxxxxx4d15662f95",
        "app_id": "xxxxxxxxxxxx3c-4916c7cd9434",
        "channel_id": "xxxxxxxxxxxxxxx-f2beca59cf00",
        "message_parts": [
            {
                "image": {
                    "url": "https://unsplash.com/photos/WctgWD_KyR4"
                }
            }
        ]
    }
]}

Kindly let me know how to resolve this issue. Am i missing anything in the request.
Thanks in advance. :slightly_smiling_face:

Hey @hemakumar. Welcome to the community :smiley:

By seeing the image URL, I suspect if it’s a valid image URL to start with
For example, this is a valid image URL that just opens up a valid image. Can you check that part

Thanks

i am using another image url, but facing same issue.

Hi @hemakumar,

It looks to be an issue with Freshchat’s API.

I was able to replicate this issue on my Freshchat account as well. However, the same API Payload worked when the content was a text message.

Please raise a support ticket with Freshchat via email at support@freshchat.com with this thread link. I will convey my findings to them so that they can have our Dev team look into this.

Hope this helps.

2 Likes