Skip to content

Instantly share code, notes, and snippets.

@skipjac
Created June 13, 2014 17:43
Show Gist options
  • Save skipjac/bdaee1ce41e65c2166cf to your computer and use it in GitHub Desktop.
Save skipjac/bdaee1ce41e65c2166cf to your computer and use it in GitHub Desktop.
Proof of concept to get labels for article pages in zendesk helpcenter
<script>
var getPath = document.location.pathname;
var locID = getPath.split('/');
$.ajax({
type: "GET",
url: 'https://yourdomain.zendesk.com/api/v2/help_center/articles/'+locID[locID.length -1]+'.json',
success: function(data){console.log(data)},
dataType: 'application/json',
contentType: 'application/json'
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment