Creating Secured API key with Django

I’ve noticed that the algoliasearch-django package is requiring an older version of the algoliasearch python library, so when following the documentation for generating a secured key doesn’t work.

I’m building an app where data from multiple companies are stored in the same database. I want to create a secured API key that will always limit a search to results for the current company. I have a company_id attribute set on my index, so how do I build the queryParameters for the client.generate_secured_api_key method in the version 1 library?

Hi Eric,

Sorry for the late answer. Could you please provide a link to the documentation you’re referring to, as well as the versions of the software/packages you’re using ?

Thank you,

I’m using algoliasearch-django version 1.7.2 and trying to follow this page on the docs.

Hi @eric4!

You can find here the definition for the generate_secured_api_key method in the v1 of the Python client. The query parameters can be sent as dict like in the current version.

have a good day!