Getting your Spellbook API Key
To start using the Spellbook APIs, you'll need an API key. Your Spellbook API key can be found in the Settings tab of Spellbook. Go ahead and copy your API Key using the copy button (as shown in the screenshot below).
Using your API Key
Spellbook uses HTTP Bearer Auth to authenticate your API calls. Your API key should be included as part of the header in every Spellbook API call. For example, in the following code snippet, you would replace [Your Spellbook API Key] with the API key you got using the instructions above.
headers = {
"accept": "application/json",
"Authorization": "Bearer [Your Spellbook API Key]"
}
response = requests.post(url, headers=headers)
Tip: Putting your API key in the Header field in the top right of every API doc page (see screenshot below) will automatically generate the authentication header necessary to make an API call.
