We've built a decent sized app that utilizes Zendesk as the front-end, with some third party automation tools to strip out information from the ticket and move it around to other systems.
One of the key steps was to take a copy of the Zendesk ticket's attachments via the api/v2/tickets/[ticket ID]/comments/ API call. This was working fine for about 9 months, with the attachments being taken from Zendesk and added to SharePoint via the API call.
What's weird is that this has started producing weird results. It takes across the file name and creates the file fine, but the content of the file is behaving oddly. All files (mostly PDFs) taken to SharePoint now are 1.97kb in size (regardless of their size in Zendesk), and won't open in any tool except notepad++.
The tool that we were using to do this is returning a 200 code for each attachment on the ticket, and I can see the data from the /comments call is being returned correctly. The content_URL values it spits out from this call is correct, and when you manually enter these URLs into the browser they return the correct results for each attachment. But when the app then tries to reach out to that URL to copy the attachment's content it's instead spitting out the values below.
Has anyone seen this before? I'm assuming it's something to do with all the mentions of 'unauthenticated' below, but weird that it broke after working fine for most of a year!
Notepad ++ data of each document
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0">
<link rel='shortcut icon' href='/hc/favicon' type='image/png'/>
<link href="https://xxxx.zendesk.com/access/unauthenticated" rel="canonical"></link>
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="Nivai+IStuH+0G+mE143bmnZam7sQ78xL7OaKycIHzNPa840bZ0qc/fPZs6Dfqh9" />
<link rel="stylesheet" media="screen" href="https://static.zdassets.com/classic/assets/application/help_center-6d63dd454656b2546cd1421637a7ee46.css" />
<!--[if gte IE 7]>
<body class="access access-unauthenticated">
<a href="/hc" title="<span class="translation_missing" title="translation missing: en-US-x-1.txt.help_center.helpers.application.home">Home</span>"><img id="logo" alt="Logo" src="/hc/logo" /></a>
<script src="https://static.zdassets.com/classic/assets/zendesk/auth/v2/host-caa6da480a50ffd4f8a111ed7c9e8ac0.js" data-brand-id="149544" data-auth-origin="149544,false,true" data-auth-domain="https://xxxxx.zendesk.com" data-return-to="https://xxxxx.zendesk.com/attachments/token/xxxxxxxxxxxxxx?name=xxxxxx.pdf" data-theme="hc" data-locale="1" data-action="signin"></script>
Please sign in to leave a comment.