API Authorization

Authorizing to the Izlo API is simple and uses a Bearer token authorization pattern. This is common for many APIs and should have you up and running quickly.

Before you can be authorized into the application you will need to first have an API key. If you haven't done so yet, please generate one or refer to the docs to get your key.

The next step we will be using the example of listing all of the prompts within your database just to demonstrate how the bearer token works. You can find examples of the API response later in the documentation.

Here is how to use your API key as the bearer token

example.js
fetch('https://getizlo.com/api/v1/list-prompts/', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json',
            'Authorization': 'Bearer ' + YOUR_API_KEY,
        },
    })
example.py
import requests

url = 'https://getizlo.com/api/v1/list-prompts/' 
token = 'YOUR_API_KEY' 

headers = {
    'Authorization': 'Bearer ' + token
}

response = requests.get(url, headers=headers)

As you can see authorization is straight forward and can be done directly after generating your first API key.