Skip to content
Discussion options

You must be logged in to vote

Found the solution after some trials

I used the Public Client API and have to send a post request with the following in the body

  • Body type = multipart/form-data (boundary will be auto calculated by clients like postman or python requests module)
  • Body contents key/value as below:
    "attachments[]": {filename}, {encodedfile}, {mimetype}

*{filename}, self explanatory
*{encodedfile}, you need to read the raw data of the image file and include it
*{mimetype}, for example if the file is png you make it image/png, if the file is jpg, you make it image/jpg

Here is a simple python code that worked for me:

import requests

# API URL and token
url = "https://chatwoothost/public/api/v1/inboxes/{inbox…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ibrahim-almahfooz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant