API keys
List of methods
Create secured API Key |
Generate a secured API key without any call to Algolia’s servers. |
Add API Key |
Add a new API Key with specific permissions and restrictions. |
Update API Key |
Replace every permission of an existing API key. Any unspecified field resets that permission to its default value. |
Delete API Key |
Delete an API Key. |
Restore API Key |
Restore a deleted API key, along with its associated rights. |
Get API Key permissions |
Get the permissions of an API key. When initializing the client using the admin API key, you can request information for any of your application’s API keys. When using a non-admin API key, you can only retrieve information for this specific API key. |
List API Keys |
Get a list of API keys. |
Get secured API key remaining validity |
Retrieve the remaining validity of a secured API key in seconds. |
It’s recommended to use the Kotlin API client, which is better suited for Android development.
We released a new version of the JavaScript API client in public beta. Read the beta documentation for more information.
We released a new version of the PHP API client in public beta. Read the beta documentation for more information.
We released a new version of the Java API client in public beta. Read the beta documentation for more information.
Difference between adding and generating (secure) API keys
You can create new API keys in two different ways: addApiKey
and generateSecuredApiKey
.
The differences are:
Add API key
runs on Algolia’s servers;Generate Secured API key
runs on your own server.- Added keys appear in the Algolia dashboard; generated keys don’t.
- You add keys that are fixed and have very precise permissions. They’re often used to target specific indices, users, or application. They’re also used to generate secured API keys.
You should generate secured API keys when building mobile applications with Algolia.