<div class="form-group">
  <label>File id</label>
  <input id="mediaId" type="text" class="form-control" placeholder="e.g. 565eabfbfdfe600021f8d1e0" style="width: 100%" />
</div>
<div class="form-group">
  <label>Token</label>
  <input id="token" type="text" class="form-control" style="width: 100%" />
</div>
<button id="getFile">Get private file</button>

<div id="response"></div>
$(function() {
  $("#getFile").click(function() {
    $.ajax({
      url: "https://api.yaas.io/hybris/media/v2/files/" + $("#mediaId").val(),
      type: "GET",
      beforeSend: function(xhr) {
        xhr.setRequestHeader('Authorization', 'Bearer ' + $("#token").val());
      },
      success: function(result) {
        var img = $("<img>");
        img.attr("src", result.link);
        img.appendTo('#response');
      }
    });
  });
});