-
Compute a SHA-256 HMAC with:
- Secret: the parent API key
- Message: a URL-encoded list of query parameters
- Concatenate the SHA-256 HMAC with the list of query parameters into a single string.
-
Encode the resulting string in
base64.
Usage
Report incorrect code
Copy
var response = client.GenerateSecuredApiKey(
"2640659426d5107b6e47d75db9cbaef8",
new SecuredApiKeyRestrictions
{
ValidUntil = 2524604400L,
RestrictIndices = new List<string> { "Movies" },
}
);
Parameters
- C#
- Go
- Java
- JavaScript
- Kotlin
- PHP
- Python
- Ruby
- Scala
- Swift
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.
The API key to be used as secret for the secured API key.
The secured API key inherits all restrictions from its parent.
You can’t use an Admin API key as parent.
You must apply at least one restriction when creating a secured API key.
If you try to use a secured API key with the same restrictions as its parent key,
the API returns a
403 Forbidden error.Show child attributes
Show child attributes
Search parameters that are always applied when using this API key.
For more information, see API parameters.
Filters that are always applied when using this API key.
Timestamp when the API key expires,
in seconds since the Unix epoch.
Indices names that this API key can access.
Use
* as a wildcard, for example dev_* to allow all indices with names that start with dev_.IP network range that is allowed to use this API key.
By default, rate limits are applied per IP address.
If many users share an IP,
add a user token to each generated API key to avoid incorrect rate limiting.