Closed cfleetwood closed 4 years ago
@cfleetwood you need to add 

(line feed) at the end of each line of DS_PRIVATE_KEY.
Here is an example: https://github.com/docusign/eg-01-csharp-jwt-core/blob/master/common/App.config_example.txt#L12-L21
@mmallis87 Thanks for the info. That resolved that particular exception, but now I'm encountering the following exception/error instead:
Sending an envelope with three documents. This takes about 15 seconds...
Obtaining a new access token...
DocuSign Exception!
C O N S E N T R E Q U I R E D
Ask the user who will be impersonated to run the following url:
https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature impersonation&client_id=94eb2ea6-a516-4d99-9bca-66c0a941bc2b&redirect_uri=https://www.docusign.com
It will ask the user to login and to approve access by your application.
Alternatively, an Administrator can use Organization Administration to
pre-approve one or more users.
Done. Hit enter to exit...
Based on the documentation, I thought that the integration key was the primary authentication for the authorized application. I have a specific application defined under an organization definition and I'm referencing the integration key in my app.config flle. Am I missing something? I do have two (2) users/emails specified in the app.config file (I thought they were the "recipients").
Chris Fleetwood Software Developer North Carolina Partnership for Children, Inc. cfleetwood@smartstart.org
@cfleetwood this is totally normal: the first time you use JWT it will ask you to grant access to the integration key you're using. This is because the key is "impersonating" you (your user ID). It's one-time deal. You won't need to do it again unless you revoke access to this I.K.
All you have to do is to open this url in the browser and login if needed: https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=94eb2ea6-a516-4d99-9bca-66c0a941bc2b&redirect_uri=https://www.docusign.com
More on this topic: https://developers.docusign.com/esign-rest-api/guides/authentication/obtaining-consent
@mmallis87 OK. I tried the link you posted and I do get to the Docusign login screen, but the following error message also displays in RED:
Invalid authentication request: The response type is not supported.
The above error reappears after i enter my login/password info.
I imagine this is a "first-time" error as well.
Chris Fleetwood Software Developer North Carolina Partnership for Children, Inc. cfleetwood@smartstart.org
@cfleetwood do you mind sharing your I.K. settings? Here is an example of what I'm looking for:
@mmallis87 Here are my integration key settings:
One difference I noticed that, while you had Authentication set to Authorization Code Grant, I had it set to Implicit Grant. So I changed that accordingly.
I also noticed that your example had no Redirect URI set: my config had it set to http://www.smartstart.org, my employers' corporate website home page.
However, when I re-ran the code, got the "approve" user error and URL, and then pasted it in a browser, I got the login screen and the following error:
The redirect URI is not registered properly with DocuSign
So, since your example had no Redirect URI set, I removed the setting, I re-ran the code, got the "approve" user error and URL, and then pasted it in a browser, I got the login screen and the following error:
There are no redirect URIs registered with DocuSign
So I reentered the URI and saved the integration key definition.
The URI is saved in the API & Keys definition so I don't understand what I'm missing.
Chris Fleetwood Software Developer North Carolina Partnership for Children, Inc. cfleetwood@smartstart.org
@cfleetwood the consent URL should include the redirect uri that you have put in the I.K. settings. In your case it's https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=94eb2ea6-a516-4d99-9bca-66c0a941bc2b&redirect_uri=http://www.smartstart.org/
@mmallis87 That worked; I was able to get the consent for the cfleetwood@smartstart.org userid.
My test project now works. I ran the test project and received the following email:
Many thanks for your assistance!
Chris Fleetwood Software Developer North Carolina Partnership for Children, Inc. cfleetwood@smartstart.org
@cfleetwood I'm glad your integration is working now. Happy DocuSigning!
Hello all,
I am working with the jwt-framework demo solution.
Working in the Docusign Admin / API and Keys area, I have created my User ID, App / Integration Key,, API Account ID and RSA Keypairs information. I have also set the Account's Base URI to https://demo.docusign.net.
Following the setup instructions, I modified the default app.config file with my configuration information.
Running the project in debug mode, I am encountering an "Unexpected PEM type" exception at the following line:
Although similar questions/issues raised received answers about putting the key information in .pem files, the demo project I am using has the key information hardcoded in the app.config file as follows:
DS_CLIENT_ID is the Integration Key DS_IMPERSONATED_USER_GUID is the User ID DS_AUTH_SERVER is the Account's Base URI DS_PRIVATE_KEY is the private key component of the RSA Keypair (minus the "Begin Private Key"/"End Private Key" strings)
Any ideas as to what is causing this exception? Any insights and/or suggestions would, of course, be greatly appreciated.
Regards,
Chris Fleetwood Software Developer North Carolina Partnership for Children, Inc. cfleetwood@smartstart.org