How to make Oxford Dictionary API call in React using axios

I’m trying to make Oxford Dictionary API call using axios, but it is having cors issue. I also added proxy but that returns 403 error status. I also used anywhere.heroku and that didn’t work either. SO is there a way to make this API without any issue. Below is the code of the API call.

axios.get("https://oda-pi.oxforddictionaries.com/api/v2/entries/en-gb/ace?strictMatch=false", {
    headers: {
      "Accept": "application/json",
      "app_id": my_app_id,
      "app_key": my_app_key,
    }
  })
  .then((response) => {
    console.log(response);
  })

enter image description here

Answer

You need a backend to make this API call to you and not make this API call directly in the frontend (React). Furthermore, this will hide your sensitive information (API key and app id) and also will remove the CORS errors.

Node.JS Example: https://codesandbox.io/s/modest-bassi-xff43?file=/src/index.js