Webresource form in power apps api show 401 error

I created web-resource form using html,JavaScript and jQuery when i deployed in power application the API show error 401 (unauthorized) and not working. When deployed we used below script also for access data from data verse. please suggest any solution for this.

$.ajax({
      type: "GET",
      contentType: "application/json; charset=utf-8",
datatype: "json",
url: "[Org_Name]/api/data/v9.2/[Table and requested fiels]",
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("OData-MaxVersion", "4.0");
XMLHttpRequest.setRequestHeader("OData-Version", "4.0");
XMLHttpRequest.setRequestHeader("Accept", "application/json");
XMLHttpRequest.setRequestHeader("Prefer", "odata.include-annotations="*"");
},
async: false,
success: function (data, textStatus, xhr) {
var results = data;
for (var i = 0; i < results.value.length; i++) {}
},
error: function (xhr, textStatus, errorThrown) {
console.log(textStatus + " " + errorThrown);
}});

below script are also used for data transaction