Skip to content
Advertisement

Issue with DocuSign sending Envelopes

I recently changed my DocuSign integration to use the JWT OAuth flow. To achieve this I have a few classes.

OAuth Client

JavaScript

Signature Client Service

JavaScript

Then, in my constructors where I want to use it I’m doing

JavaScript

Finally, I use it like so

JavaScript

But I get an error that reads

DocuSigneSignClientApiException: Error while requesting server, received a non successful HTTP code [400] with response Body: O:8:”stdClass”:2:{s:9:”errorCode”;s:21:”USER_LACKS_MEMBERSHIP”;s:7:”message”;s:60:”The UserID does not have a valid membership in this Account.”;} in /homepages/45/d641872465/htdocs/sites/ita-portal/vendor/docusign/esign-client/src/Client/ApiClient.php:344

I researched this and this would imply that the user is not within the account, but they are. I also checked that this account owns the envelopes that I’m trying to send.

For reference I took inspiration for envelope sending from here: https://developers.docusign.com/docs/esign-rest-api/how-to/request-signature-template-remote/

Advertisement

Answer

What I think is happening is that the request is going to the wrong server or the wrong account.

I’d suggest using a packet analyser like Fiddler or Wireshark to log where your requests are headed (or just log the request within your application)

The auth URLs seem to be correct since you’re not getting a 401 unauthorised error but the envelopes and other queries’ must match the base URL located in your account under the Apps and Keys page. It would be of the form demo.docusign.net for our demo environment or xxx.docusign.net for our production environment

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement