3

I would like to create a ticket with inline image but cannot get through it. I am using a rich text having a pasted screen capture image, the content is like

"<img ..."

By using ZendeskApi_V2, I set the Ticket's Comment HtmlBody with the content mentioned but did not work, neither of PlainBody or Body.

Anyone can help, please.

For instance:

In my application, an image is inserted into a RadEditor

enter image description here

By setting the Ticket.Comment as

var ticket = new Ticket {
    Comment = new Comment {
        HtmlBody = HttpUtility.HtmlDecode(RadEditor.Content)
    }
}

After sending the Create Ticket request, I cannot see the inline image in the Zendesk dashboard.

So, did I do it in a right way? How should an embedded or inline image be sent through Zendesk API?

James Rao
  • 168
  • 2
  • 13
  • Seeing the actual request that you're making, or perhaps the code that you're using to make the request, would help people to better understand your problem. – jpalmieri Jan 17 '18 at 17:40
  • Thanks jpalmieri. I have updated the question with more detail. My purpose is to ask for a right way to send a ticket with an inline image, not an attachment image. – James Rao Jan 19 '18 at 02:32
  • @JamesRao did you solve it? If so, could you share the code in a new answer, please? – ilCosmico Sep 15 '22 at 09:46
  • @ilCosmico it's being a while. i cannot remember precisely, but can you pls try Jimmy Long method? – James Rao Sep 15 '22 at 10:53

1 Answers1

1

You may need to upload the attachment file first, then you can set the attachment's token in the comment. See here - https://developer.zendesk.com/rest_api/docs/support/tickets#attaching-files

Jimmy Long
  • 688
  • 2
  • 9
  • 23
  • 1
    Here is the updated link: https://developer.zendesk.com/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#attaching-files – ilCosmico Sep 15 '22 at 11:01