SummaryA description of the methods for authentication with the API (API Key and username/password).

The first step in almost every task is to connect to your Alooma system by creating an instance. In fact, all of the examples and tasks we'll cover in the documentation require this.

Alooma supports API Key authentication, where a unique API key is assigned to a specific Alooma user. We recommend creating a dedicated user for the purpose of API authentication.

API Key authentication

If you want to authenticate via key when using the Alooma API, you'll first need to generate a key. Click Generate Key on the API Key page available from the Settings page. IMPORTANT: Copy the key somewhere secure as this is the ONLY time the key will be displayed in the Alooma user interface.

Each user can only ever have one active key.


If you want to prevent the API key from working, you can revoke the current active key by clicking the Revoke Key button on the API Key page. Once you do, all API access using the current API key will be disallowed.


If you revoke your API key, you cannot re-enable it. You must create a new key. 

You can re-enable API key authentication by generating another key and then updating your existing authentication scripts/code.

To authenticate via API Key, you'll need to specify:

  • API Key

  • Account Name (optional)

 **** **** **** ******** **** **** ****
 **** Getting an Alooma API Object ****
 **** **** **** ******** **** **** ****
API_KEY = "7ef90863dd9b5ae1009b41b0c7542c020dc62e" # example
ACCOUNT_NAME = "alooma" # optional, depending on your deployment

## We will use this api object throughout the documentation ##
api = alooma.Client(api_key=API_KEY, account_name=ACCOUNT_NAME)
Passing credentials

You can provide your credentials in different ways: directly in the code, included via a module, exported environment variables, etc. For example, in unix/linux/macOS you can export the variables:

# for API KEY authentication
export API_KEY=<your_api_key>
What's next?

Now that you can initialize the API and authenticate, you can move along to actually using the API to:

See the client reference for more information.

Search results

    No results found