422 Unprocessable Entity error uploading attachment



Posted Jul 08, 2022

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?

 

 


0

1

1 comment

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.

0


Sign in to leave a comment.

Didn't find what you're looking for?

New post