422 Unprocessable Entity error uploading attachment | Community
Skip to main content

422 Unprocessable Entity error uploading attachment

  • July 8, 2022
  • 1 reply
  • 0 views

Using the latest .Net Zendesk API version 3.12.0, I'm getting the

"The remote server returned an error: (422) Unprocessable Entity.Error content: {"error":"AttachmentUnprocessable","description":Attachment file could not be processed."}

I'm passing in a pdf file as "attachment".  It's failing on the UploadAttachment, but I'm passing in the file as a ZenFile.  Here's the code portion that is failing.

ZendeskApi api = new ZendeskApi("https://domain.zendesk.com/api/v2", "user", "password");

                    ZenFile file = new ZenFile
                    {
                        FileName = attachment                        
                    };
                    api.Attachments.UploadAttachment(file);

 

What am I missing to get this error?

 

 

1 reply

Greg29
  • July 11, 2022

Hi Kevin! That wrapper isn't something that we own, however you can check here for links to the repo and documentation for it so that you can contact the owners.