algolia / algoliasearch-client-python

⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
https://www.algolia.com/doc/api-client/getting-started/install/python/?language=python
MIT License
196 stars 66 forks source link

New method: GetSecuredApiKeyRemainingValidity #443

Closed Ant-hem closed 5 years ago

Ant-hem commented 5 years ago

Summary

When a secured API keys expire, search breaks. The current workaround is more complex than it needs to be.

The options for developers using Algolia require, at every place where a search operation is performed, catching an operation error, identify it as a "ValidUntil" error, then regenerate the API key, and perform the search operation again.

The idea is to define a method which tells if a SecuredAPIKey is expired or not without making a single call to Algolia's API.

References