GET /generateSecuredApiKey

Generates a secured API key without any requests to Algolia's servers.

Secured API keys are API keys that you generate on your server without any API request to Algolia. Secured API keys help in environments where you can't easily update the client-side code, such as mobile apps, or when you need to restrict access to a part of your index for every user.

When your users start searching, instead of using the Search API key, they request a short-lived secured API key from your server. On your server, you use this method to create a secured API key, with any restrictions you'd like, such as filters, index access restrictions, or expiration times. The API key gets longer the more restrictions you add. Your users then use the secured API key to search with Algolia.

You can't create secured API keys from other secured API keys or from your Admin API key. The generated API key can have the same restrictions as the parent API key, or be more restrictive.

Servers

Query parameters

Name Type Required Description
restrictions Object Yes

Restrictions to add to the API key.

parentApiKey String Yes

API key from which the secured API key will inherit its restrictions.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.