GetToken returns CORS

Hello, I encounter the CORS issue when I tried to request the token from my website.
May I know how can I whitelist the DNS from the server-side?


I will share my answer here in case anyone is looking for a solution.
In order for you to generate a token, you can’t use it client-side application. You will get a CORS error.

You would need a server-side to generate a token by calling the OneMap API.

const { status, data, error } = await axios({
  method: "POST",
  url: "",
  data: {
    email: ...,
    password: ...,

The code above is a sample.