Skip to content
seed

Fetch request with authorization header

js
const apiCall = () => {
  fetch(url, {
    headers: {
      Authorization: `bearer ${private_api_key}`,
    },
  })
    .then(res => res.json())
    .then(data => console.log(data))
    .catch(err => JSON.stingify(err))
}
const apiCall = () => {
  fetch(url, {
    headers: {
      Authorization: `bearer ${private_api_key}`,
    },
  })
    .then(res => res.json())
    .then(data => console.log(data))
    .catch(err => JSON.stingify(err))
}
ADDITIONAL RESOURCES