'Docusign: HTTPSConnectionPool(host='none', port=443): Max retries exceeded with url: /oauth/token
I have successfully generated code via get_authorization_uri (at localhost). But when I try following:
token = api_client.generate_access_token(client_id, client_secret, code)
With python SDK docusign_esign it gives me following error:
HTTPSConnectionPool(host='none', port=443): Max retries exceeded with url: /oauth/token
But when I copy generate_access_token and its dependent functions in my custom class it works fine and return token.
Please note that I called rest_client in my copied function via ApiClient() it works fine, see at rest_client
What am I doing wrong?
Solution 1:[1]
It looks like you are not specifying the auth URL before trying to generate the token.
You should be doing a POST to https://account-d.docusign.com/oauth/token
in the error message, it shows that host = 'none'
The host should be account-d.docusign.com or https://account-d.docusign.com
This link will help you with Python SDK authentication: https://developers.docusign.com/docs/esign-rest-api/sdk-tools/python/auth/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | YaraK |
