Closed echoopen closed 8 months ago
[!CAUTION] PLEASE DELETE AND REFRESH YOUR API KEY! You just publicly posted your API key, which means it should be considered compromised.
Also, the error here is that the secret is "PATENT_CLIENT_EPO _API _SECRET". Closing to minimize visibility. I may also add an error if no key is detected.
thank you
I did it like below:
os.environ['PATENT_CLIENT_EPO_API_KEY'] =
still it says: patent_client.epo.ops.session.OpsAuthenticationError: Failed to authenticate with EPO OPS! Please check your credentials. See the setup instructions at https://patent-client.readthedocs.io/en/stable/getting_started.html
i was able to play around in epo-ops using the same credentials. Please help !
@amit-trexo your issue is that the OPS client is initialized when patent_client is imported. Make sure your os calls are made before you import patent_client and it should work. Also look into using python-dotenv
, which is my preferred way of doing this.
Thanks for such a prompt response. It worked for me.
Sorry, but I would like you to help me check if there is something wrong with my code.thanks
import os os.environ['PATENT_CLIENT_EPO_API_KEY'] = "qhhhJEomwIu8uH9b5O7AaqPfwNlEnVik" os.environ['PATENT_CLIENT_EPO_SECRET'] = "OXIu6zrsbg4iBOl6" print(os.environ['PATENT_CLIENT_EPO_API_KEY']) print(os.environ['PATENT_CLIENT_EPO_SECRET']) from patent_client import Inpadoc case = Inpadoc.objects.get("EP1000000A1")
The error is:
However, when I test using the official website’s api, 200 OK is returned.