Authentication

Each API request requires an API key as a HTTP Header

You can find your API key in the Frill Dashboard.

Your API key has many privileges, be sure to keep it secret! Do not share the key in publicly accessible areas such GitHub, client-side code, and so forth.

To ensure the security of the absentify REST API, the API is protected using an API key that is required to be included in the header of each API request. The API key should be sent as a value of the x-api-key parameter. This key is unique to each absentify account and provides access to the API endpoints. It is important to keep the API key confidential and not share it with anyone else, as it provides access to sensitive data within the account. In the event that the API key is compromised, it can be regenerated within the absentify dashboard to prevent any unauthorized access to the account's data.

import requests

url = "https://api.absentify.com/api/v1/example_endpoint"
api_key = "your_api_key_here"

headers = {
    "x-api-key": api_key,
    "Content-Type": "application/json"
}

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

print(response.json())

In this example, we first define the API endpoint URL and the API key. Then, we create a dictionary of headers, including the x-api-key parameter and the Content-Type parameter with a value of "application/json". Finally, we make a GET request to the API endpoint using the requests library and passing in the URL and headers dictionary. The response is then printed as JSON.

Note that you would need to replace "https://api.absentify.com/api/v1/example_endpoint" with the actual API endpoint URL you want to use, and "your_api_key_here" with your actual API key.

Last updated