Hola!
I think it’s possible but if you share your cURL command (or Fetch syntax) we can try to fix it.
Your JS code might look like:
var data= await fetch('YOUR_URL', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'YOUR_BearerToken'
},
});
const json = await data.text(); // or data.json();
return json
Saludos!