Generate search keys
For client-side implementations, always use a Search-only API key. Your Admin API key is sensitive. You should never share it with anyone and it must remain confidential. To generate a search key for a given index, use theSearchClient
βs generateSecuredApiKey
method.
Store your search-only API key in your environment variables,
or generate a new one using the Clientsβ
addApiKey
method.PHP
validUntil
parameter to set a validity period.