Conjur-api-python3 - Trouble authenticating

I’m trying to retrieve secrets in Python 3 and am using conjur-api-python3

Authentication works when using the conjur-cli tool included with the pip install, but doing the same thing from within Python results in an error.

[root@lncd906 ~]# conjur-cli list | head -4 | sed ‘/REDACTED/s//REDACTED/’
[root@lncd906 ~]# python3
Python 3.6.8 (default, Jun 11 2019, 15:15:01)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

from conjur import Client
c = Client()
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.6/site-packages/conjur/”, line 115, in list
return self._api.list_resources()
File “/usr/local/lib/python3.6/site-packages/conjur/”, line 147, in list_resources
File “/usr/local/lib/python3.6/site-packages/conjur/”, line 90, in api_token
self._api_token = self.authenticate()
File “/usr/local/lib/python3.6/site-packages/conjur/”, line 133, in authenticate
self.api_key, ssl_verify=self._ssl_verify).text
File “/usr/local/lib/python3.6/site-packages/conjur/”, line 62, in invoke_endpoint
File “/usr/local/lib/python3.6/site-packages/requests/”, line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url:

Hey @chris_barber, I responded on the GitHub issue :slight_smile:.

We can use that same GitHub issue for faster cycle times if that works for you.

Cool. I wasn’t sure where I would get the best response.

Can you comment the link to the issue?

@jake Issue: