API keys API client methods
This is documentation for v3 of the PHP API clients, which is not the latest version. To see the documentation for the latest version, see PHP v4.
This is documentation for v2 of the Ruby API clients, which is not the latest version. To see the documentation for the latest version, see Ruby v3.
This is documentation for v4 of the JavaScript API clients, which is not the latest version. To see the documentation for the latest version, see JavaScript v5.
This is documentation for v3 of the Python API clients, which is not the latest version. To see the documentation for the latest version, see Python v4.
This is documentation for v8 of the Swift API clients, which is not the latest version. To see the documentation for the latest version, see Swift v9.
This is documentation for v2 of the Kotlin API clients, which is not the latest version. To see the documentation for the latest version, see Kotlin v3.
This is documentation for v6 of the C# API clients, which is not the latest version. To see the documentation for the latest version, see C# v7.
This is documentation for v3 of the Java API clients, which is not the latest version. To see the documentation for the latest version, see Java v4.
This is documentation for v3 of the Go API clients, which is not the latest version. To see the documentation for the latest version, see Go v4.
This is documentation for v1 of the Scala API clients, which is not the latest version. To see the documentation for the latest version, see Scala v2.
Create secured API key |
Generate a secured API key without any calls 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. |
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. |
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. |
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.