Algolia icon

Algolia

Use Algolia in your n8n workflows

Api Keys → Create an API key

AI-generated

Overview

This node operation creates a new API key in Algolia with specific permissions and restrictions. It allows users to define the access control list (ACL) for the API key, specifying what types of API requests the key can make. Additional properties such as description, accessible indexes, query limits, IP restrictions, HTTP referrers, and expiration time can also be configured. This operation is useful for managing secure and controlled access to Algolia's search API, enabling fine-grained permission settings for different use cases.

Use Case Examples

  1. Creating an API key that only allows search operations on specific indexes.
  2. Generating an API key with a limited number of queries per IP per hour to prevent abuse.
  3. Setting up an API key that expires after a certain duration for temporary access.

Properties

Name Meaning
Acl Permissions that determine the type of API requests this key can make.
Description Description of an API key to help identify it.
Indexes Index names or patterns that this API key can access.
Max Hits Per Query Maximum number of results this API key can retrieve in one query.
Max Queries Per IPPer Hour Maximum number of API requests allowed per IP address or user token per hour.
Query Parameters Query parameters to add when making API requests with this API key, including IP restrictions.
Referers Allowed HTTP referrers for this API key.
Validity Duration (in seconds) after which the API key expires.

Output

JSON

  • key - The created API key string.
  • acl - The access control list associated with the API key.
  • indexes - The indexes or patterns the API key can access.
  • description - Description of the API key.
  • maxHitsPerQuery - Maximum hits per query allowed by the API key.
  • maxQueriesPerIPPerHour - Maximum queries per IP per hour allowed by the API key.
  • queryParameters - Additional query parameters for the API key.
  • referers - Allowed HTTP referrers for the API key.
  • validity - Expiration duration of the API key in seconds.

Dependencies

  • An API key credential for Algolia authentication

Troubleshooting

  • Ensure the ACL JSON is correctly formatted and includes valid permissions as per Algolia's API documentation.
  • Verify that any IP or referrer restrictions are correctly specified to avoid request failures.
  • Check that the API key description and other optional properties are properly set to avoid misconfiguration.
  • If the API key creation fails, confirm that the authenticated user has the necessary permissions to create API keys in Algolia.

Links

Discussion