Hi Viral,
I recommend checking out Front’s attachment example here:
https://dev.frontapp.com/docs/attachments-1
Â
If you still have issues after referencing that example, please write in to api@frontapp.com and our support engineers will be happy to troubleshoot this with you!
HIÂ Evan,
i trying to add attachment base64 and binary requestÂ
https://api2.frontapp.com/channels/cha_abcd/incoming_messages
{
"to": "
  "malhar@abcds.io"
  ],
  "options": {
    "archive": true,
    "tag_ids": Â
      "tag_3d08eq",
      "tag_3965jm"
    ]
  },
  "sender": {
    "handle": "abcd.viral@gmail.com"
  },
  "body_format": "markdown",
  "subject": "Send Mail upload",
  "body": "This is an SMS message with an attached photo of a cat",
  Â
 "attachments": p
  "data:image/png;name=cbimage.png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABQAMgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2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LDEvywupU7juwN/mYwoOwYxQBnn4nakviBI2j00WcnihvD6WRDfaGVQA1wJN+CAzLlfL4DAbsnNB+J2pL4gSNo9NFnJ4obw+lkQ32hlUANcCTfggMy5Xy+AwG7JzWhrfgXUtd8WWN/PZ+H4Es9Yh1AanbxMt3LDEvywupU7juwN/mYwoOwYxRrfgXUtd8WWN/PZ+H4Es9Yh1AanbxMt3LDEvywupU7juwN/mYwoOwYxQBT/wCFj6x/wl/9mfZrH/kYP7J/sry3+2fZ/L3fbN27/V/xf6vG3+L+Kuo+z+Nf+Eo+3fbdK/sbzfI/sza27yMf6/ztufOz/wAs8bNvG7PzVy//AArjWP7Y8r7TY/2Z/wAJX/wkn2je/nfd/wBT5W3b97jfv6c7e1eoUAeX/wDCx9Y/tjzfs1j/AGZ/wlf/AAjf2fy3877v+u83dt+9zs2dON3ermieOtS13xZfWEF54fgSz1ibTzplxKy3csMS/NMjBjuO7J2eXjCkbxjNU/8AhXGsf2x5X2mx/sz/AISv/hJPtG9/O+7/AKnytu373G/f0529qjHwx1JfEDyLJpos5PFC+IHvQW+0Mqglbcx7MEBmbDeZwGJ25OKANDwB461LxmbS8N54f8i4Sd59MilYXtmqybYyfmYSAjGSVj+8CM9D6JXlfhH4Y6l4f1Tw158mmraaA984uLcsZb9p/lUuhQBCqYGd7/dA6cj1SgAooooAKKKKACiiigD/2Q=="
 ]
}
Â
Getting same response please help me regarding this issue solvedÂ
Â
{
    "_error": {
        "status": 400,
        "title": "Bad request",
        "message": "content-type missing boundary"
    }
}
{
    "_error": {
        "status": 400,
        "title": "Bad request",
        "message": "Body did not satisfy requirements",
        "details": c
            "body.sender: missing",
            "body.body: missing"
        ]
    }
}
Hi Viral,
That endpoint doesn’t accept attachments on requests of Content-Type: application/json. You must submit your request as Content-Type: multipart/form-data.  The attachment itself should be sent as a binary file with no encoding.
All developer documentation pages describing endpoints that accept attachments, including:
https://api2.frontapp.com/channels/cha_am1le/incoming_messages
won’t produce useable sample requests. You’ll need to implement those requests using the example located here:
https://dev.frontapp.com/docs/attachments-1
Â