Help with CORS issue while trying to authenticate

Hello, I’m relatively new to working with API’s and I keep running into an issue while trying to authenticate in my Javascript code. The issue I’m getting is:

‘Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.’

I was able to authenticate and use other API endpoints just fine in Postman. I exported from Postman as a Javascript fetch request and have been unable to get it to work using that. The request looks like this:

var myHeaders = new Headers();
myHeaders.append(“Content-Type”, “application/json”);
myHeaders.append(“Cookie”, “AWSALB=kFyETot9eV3/VAmA2SvalJJDmlBS2M2O7ZAjVhrsEPD+uVvJIYcD9X0VJZAKVdXtBPHoLTngStIVDZuBYAZG+FbWiLGu4rr1ey+1EsHNGwZbgYIr0SoCyntnXZH8; AWSALBCORS=kFyETot9eV3/VAmA2SvalJJDmlBS2M2O7ZAjVhrsEPD+uVvJIYcD9X0VJZAKVdXtBPHoLTngStIVDZuBYAZG+FbWiLGu4rr1ey+1EsHNGwZbgYIr0SoCyntnXZH8”);
var raw = “grant_type=client_credentials&client_id={{publicId}}&client_secret={{privateId}}”;
var requestOptions = {
method: ‘POST’,
headers: myHeaders,
body: raw,
redirect: ‘follow’
};
fetch(“https://api.tcgplayer.com/token”, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log(‘error’, error));

Any help would be greatly appreciated. Also as a side note, I don’t plan on having my final product using Javascript, I would have the API calls through Java but I’m just at the point of testing and trying to get this to work initially.