Get Secured ApiKey Remaining Validity is not a function

Hi, I am trying to use secured API Keys. Once I want to validate them on web using the full library in JS, it logs that getSecuredApiKeyRemainingValidity is not a function on the SearchClient Object.
I’m not importing the lite library, it’s the full one.

Am I missing something?

Thanks in advance!

Hi @eduTix – is there any chance you’re using the new generated APIs that are in beta? Those are pure clients from the API and don’t have some of the helper functions from the previous clients.

You would have had to explicitly requested to install the new client, though:

Otherwise, can you share more of your code here for context?

I am having the same issue. i see that getSecuredApiKeyRemainingValidity exists in the SearchClient, but i get the same error as @eduTix when I try to use it (getSecuredApiKeyRemainingValidity is not a function). Any workarounds?