title: failed to load resource the server responded with a status of 403
body: <p>I am trying to make two ajax calls to get amazon servers link and after that I am trying to play it in a modal but getting this I don't know how to solve or is there any other way in first ajax call I am taking the url from my own server and by that url's page I am trying to get amazon server's link after that I am trying to play a video i.e. on that link but it's not working</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script&gt;
  $(document).ready(function(){
  
      $('.activityinstance').click(function(){
  
            var url = $(this).find("#mod_id").attr('data-link');
  $.ajax({
  type : 'post' ,
  url : url ,
  data : {flag:'ajax'},
  
  success: function(result){
  
        $.ajax({
             type : 'get' ,
             url : result ,
  
  success: function(data){
  data=data.substring(0, data.indexOf("4"));
  console.log(data);
  $("#Mdlheader").html(data);
  var playerInstance = jwplayer("myElement");
  playerInstance.setup({
     file: data,
  });
  }
  });
  }
      });
  });
  });
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="modal fade" id="myModal" role="dialog"&gt;
   &lt;div class="modal-dialog"&gt;
  
     &lt;!-- Modal content--&gt;
     &lt;div class="modal-content"&gt;
       &lt;div class="modal-header"&gt;
         &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
         &lt;h4 id="Mdlheader" class="modal-title"&gt;Modal Header&lt;/h4&gt;
       &lt;/div&gt;
       &lt;div class="modal-body"&gt;
  &lt;div id="myElement"&gt;&lt;/div&gt;
       &lt;/div&gt;
       &lt;div class="modal-footer"&gt;
         &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
       &lt;/div&gt;
     &lt;/div&gt;
   
   &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>