Authentication

You'll need to authenticate your requests to access any of the endpoints in the Lettercast API. In this guide, we'll look at how authentication works. Lettercast uses a simple API key for authentication.

API Key

The only way to authenticate with the Lettercast API is by using an API key. You'll need to include this key in the header of your API requests.

const headers = { Authorization: `Bearer ${API_KEY}` }

fetch('https://app.lettercast.ai/pods', { headers })
  .then((response) => {
    if (response.ok) {
      return response.json()
    }
    throw new Error(`Error: ${response.status}`)
  })
  .then((pods) => console.log(pods))
  .catch((error) => console.error(error))

Was this page helpful?