Skip to content

Chatwoot attachments fail in Evolution API v2.3.7 (Missing base64 data and mediaUrl) while text messages work normally #2512

@adrienru

Description

@adrienru

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Title: Chatwoot attachments fail in Evolution API v2.3.7 (Missing base64 data and mediaUrl) while text messages work normally

Environment

  • Evolution API version: evoapicloud/evolution-api:v2.3.7
  • Chatwoot version: chatwoot/chatwoot:v4.11.0 (also testing upgrade to v4.13.0)
  • Deployment: Easypanel / Docker
  • Chatwoot integration enabled inside Evolution
  • Chatwoot URL configured with HTTPS
  • WhatsApp instance connected correctly

Problem
Text messages sent from Chatwoot are delivered normally through Evolution API.

Images / attachments fail.

Inside Evolution chat UI the message appears as:

Image couldn't be loaded
Missing base64 data and mediaUrl

Observed behavior

  • Chatwoot outgoing text works
  • Chatwoot outgoing image fails
  • Direct Postman request to /message/sendMedia/{instance} works correctly
  • Same API key and same instance work normally in Postman

Successful direct test with Postman
This payload works:

{
  "number": "519xxxxxxxx",
  "mediatype": "image",
  "mimetype": "image/jpeg",
  "media": "https://valid-public-image-url.jpg",
  "caption": "test"
}

Response returns:

  • messageType: imageMessage
  • WhatsApp receives image correctly

So sendMedia itself works.

Evolution logs when attachment fails from Chatwoot

AxiosError: Request failed with status code 403
at async io.prepareMediaMessage
at async io.mediaMessage
at async Ms.sendMedia

In another attempt Evolution UI shows:

Missing base64 data and mediaUrl

Important finding
It seems Chatwoot integration is not passing attachment payload correctly to Evolution.

Evolution appears to receive neither:

  • base64
  • mediaUrl

Possible root cause
Chatwoot attachment field may not be mapped correctly in Chatwoot integration.

Possibly missing support for:

  • attachments[0].data_url
  • attachments[0].file_url
  • attachments[0].external_url

Chatwoot behavior
Chatwoot logs show outgoing message sometimes registered only as:

content_type: "text"

even when attachment exists.

Expected behavior
When Chatwoot sends attachment, Evolution should internally map attachment URL into media field and send through sendMedia.

Question
Is this a known bug in Chatwoot integration for v2.3.7?
Has attachment mapping been fixed in newer branch?

Image

What did you expect?

When Chatwoot sends an image attachment through Evolution integration, Evolution API should correctly extract the attachment URL or base64 data and deliver the media to WhatsApp exactly like direct /message/sendMedia/{instance} requests do.

Expected result:

  • image delivered successfully to WhatsApp
  • image rendered correctly inside Evolution chat
  • no Missing base64 data and mediaUrl error

What did you observe instead of what you expected?

Text messages are delivered normally, but image attachments fail.

Observed result:

  • Chatwoot sends the conversation message
  • Evolution receives the event
  • WhatsApp message appears broken
  • Evolution UI shows:

Image couldn't be loaded
Missing base64 data and mediaUrl

In logs:
AxiosError: Request failed with status code 403

This indicates attachment payload is arriving incomplete inside Evolution integration.

Screenshots/Videos

Image

Which version of the API are you using?

2.3.7

What is your environment?

Docker

Other environment specifications

No response

If applicable, paste the log output

No response

Additional Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions