Q:

Getting 'Consent Required' error despite successful permission grant using Oauth URL

I am using the example from https://github.com/docusign/docusign-python-client (docusign python SDK). Despite granting access by logging in using the URL given by oauth_login_url below, the subsequent "api_client.configure_jwt_authorization_flow" call always results in 'consent_required' error. The corresponding integrator key is set up with right redirect URI and key pair (of which I use the private key as private_key_filename below). Note that the account is not associated to any Organization yet. I am not yet there. But I would expect this basic flow to work as is. Any idea what could be causing this error?
oauth_login_url = api_client.get_jwt_uri(integrator_key, redirect_uri, oauth_base_url)

print(oauth_login_url)

  https://account-d.docusign.com/oauth/auth?response_type=code&client_id=<integrator_key>&scope=signature%2Bimpersonation&redirect_uri=https%3A%2F%2Fwww.docusign.com%2Fapi

integrator_key = "<My INTEGRATOR_KEY1 from Docusign>"
redirect_uri = "https://www.docusign.com/api" <== same as in the Integrator Key
oauth_base_url = "account-d.docusign.com"
private_key_filename = "/Users/myname/Desktop/private.key"
user_id = "46933ecb-9aec-4fe3-8efe-7d5777ac9b54"   <== Silly me, anonymized:) but to indicate I am not using email

api_client.configure_jwt_authorization_flow(private_key_filename, oauth_base_url, integrator_key, user_id, 3600)

  Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/Users/userme/projects/docudocu/lib/python2.7/site-packages/docusign_esign/api_client.py", line 118, in configure_jwt_authorization_flow
     post_params=self.sanitize_for_serialization({"assertion": assertion, "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer"}))
     File "/Users/userme/projects/docudocu/lib/python2.7/site-packages/docusign_esign/api_client.py", line 418, in request body=body)
     File "/Users/userme/projects/docudocu/lib/python2.7/site-packages/docusign_esign/rest.py", line 244, in POST body=body)
     File "/Users/userme/projects/docudocu/lib/python2.7/site-packages/docusign_esign/rest.py", line 200, in request
     raise ApiException(http_resp=r)

     docusign_esign.rest.ApiException: (400)
     Reason: Bad Request
     HTTP response headers: HTTPHeaderDict({'X-DocuSign-Node': 'CH1DFE2', 'Content-Length': '28', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'Content-Type': 'application/json; charset=utf-8', 'Expires': '-1', 'Content-Security-Policy-Report-Only': "script-src 'unsafe-inline' 'unsafe-eval' 'self';style-src 'unsafe-inline' 'self';img-src https://docucdn-a.akamaihd.net/ 'self';font-src 'self';connect-src 'self';object-src 'none';media-src 'none';frame-src 'none';frame-ancestors 'none';report-uri /client-errors/csp", 'X-XSS-Protection': '1; mode=block', 'X-DocuSign-TraceToken': 'b009b0a6-19ad-4e58-844e-76fc5b509cbb', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Date': 'Wed, 29 Nov 2017 22:52:10 GMT', 'X-Frame-Options': 'SAMEORIGIN', 'X-AspNetMvc-Version': '5.2'})
     HTTP response body: {"error":"consent_required"}

A:

If you are using User Consent then you do not need Organization. Only thing you need to configure in your DocuSign account is, Create IntegratorKey, Create RedirectURI, CreateSecretKey (only required if you want to know userId using OAUTH APIs), Create Public/Private RSA Key. 
And your Authorization Code Grant URL to get userConsent should refer to same IntegratorKey, redirectURI which were configured in your DocuSign Account. And same Integrator Key should be used in generating JWT as well. Also oauth_base_path should be account-d.docusign.com for Demo environment. I would recommend to create JWT using JWT and test the flow using PostMan. And also use Epoch Time Converted to generate iat and exp claims.
Details for JWT related OAUTH is also explained here, JWT OAUTH, ignore Admin Consent if you are not using Organization.

