Building a server-side app - Part 2: Display server-side content in a Zendesk app

Have more questions? Submit a request


  • Michal Wysocki
    Comment actions Permalink

    I just created a simple MVC app in Visual Studio. My App is hosted on our server:

    https://X.X.X.X/ The app loads fine in ZenDesk but if I click the link to different page e.g. https://X.X.X.X/Account/Login the app displays blank screen. The console shows the following error: Refused to display 'https://X.X.X.X/Account/Login' in a frame because it set 'X-Frame-Options' to 'sameorigin'.


  • Tom
    Comment actions Permalink


    I would like to build an app where the support agents could report a bug and it would be sent to google sheet for a further investigation. 

    One of the function needed is the ticket's url that has to be sent to the google sheet. It seems that I cannot access the ticket url from the app in iframe and assign it to the variable with js. The error I receive is "Blocked a frame with origin "" from accessing a cross-origin frame."


    It would be great if someone could let me know whether there is a way to access ticket's url? 

  • Charles Nadeau
    Comment actions Permalink

    Hi Tom,

    You can access the Support REST API directly using `client.request()` ( and grab the url from the Tickets API (

    Back-of-the-envelope example with no testing:

      // create ZAF client
      const client = ZAFClient.init();
      // get the ticket id
      .then(function (data) {
        ticket_id = data[''];
      // make the Support API request
      .then(function () {
        const settings = {
          type: 'GET',
          url: '/api/v2/tickets/' + ticket_id + '.json'
        // extract the ticket url
        .then(function (data) {




Please sign in to leave a comment.

Powered by Zendesk