pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
401 stars 124 forks source link

Invalid API key #339

Closed raffaem closed 1 week ago

raffaem commented 1 month ago

It looks like pybliometrics is not able to rotate between API keys anymore.

I receive an "invalid API key" error, but if I edit the config file and append the first API key to the end of the list, it works again (thus using what was the second API key)

nils-herrmann commented 1 month ago

Scopus is trowing a 401 error for:

{
    "error-response": {
        "error-code": "APIKEY_INVALID",
        "error-message": "The provided apiKey is invalid.",
    }
}

The current code assumes that an invalid api key throws a 429.

Michael-E-Rose commented 1 month ago

That happens when a key is depleted? @raffaem is this also what you get when you use your depleted key?

Michael-E-Rose commented 3 weeks ago

I have tested this with my keys on the Abstract Retrieval API. The automatic key swap works fine and as expected. How is it going for your @raffaem ?