Call your API with JSONP

If you want your ajax call to return javascript code with the API json response wrapped inside of your callback function, you can leverage the jQuery code snippet listed on your 'API detail page'. Make sure to include your API key with each call to your API.

The code snippet is structured as so:

<script src=""></script>
  beforeSend: function(xhr) { xhr.setRequestHeader('authorization', 'Bearer {Secure_Token}'); },
  success: function (response) {
    //Do something with the response
  error: function (xhr, status) {
    //handle errors
Powered by Zendesk