0
votes

(DocuSign Support Center directed me here)

We use DocuSign as an integration in another application but I still cannot generate the token through external services/tools and have not been able to get a solid answer from DocuSign support and was directed to post my question here.

"error": "Invalid client_id", "error_description": "One or both of Username and Password are invalid."

  • We have been using this DocuSign Account/Integrator Key for over a year with no problems up until now!

This error is related to generating the "OAuth2 Token". (I have included all relevant account information at the bottom of this text box for your convenience).

This issue presented itself just after the ticket was opened about the inquiry into the advanced API plan and maybe something got shuffled unknowingly that broke the account's status for which API plan was purchased because it looks like at first glance I am prompted to buy the "basic" plan still on our live account.

(Ran this through Postman) https://www.docusign.net/restapi/v2/oauth2/token

password: "redacted", client_id: "redacted", grant_type: "password", scope: "api", username: "redacted"

The body of the response is as follows: "error": "invalid_client", "error_description": "One or both of Username and Password are invalid."

These are the exact credentials used to log in to the DocuSign portal itself so the error message is extremely confusing. I tried escaping password characters, changing the password, and even went so far as to create an entirely new integrator key by making a new sandbox account to run the 20 API calls to get it promoted assuming the problem was the key. I was able to successfully generate the OAuth Token for the demo.docusign.net account with the credentials for my sandbox account (the username used for the sandbox account was an entirely new account/email setup).

1
I have not written OAuth code for DocuSign, but your error message means that the value you are using for Client ID / Client Secret is invalid. If possible, can you reset these value and then try again with the new credentials. - John Hanley
I have reset the password and created a new integrator sandbox key on a separate account which was then promoted it to the problem account. - StephansRealFakeName
I don't understand your comment. - John Hanley
I have created a new client id and secret and the problem still persists. Client ID = integrator key and secret = password.. - StephansRealFakeName
It looks like you're using the legacy OAuth endpoints. I'd recommend checking out Account Server authentication documented here: developers.docusign.com/esign-rest-api/guides/authentication/… - Drew

1 Answers

0
votes

DocuSign has a demo (sandbox) environment for testing as well as it's core production environment. In the demo system all the API endpoints start with the following base URI:

https://demo.docusign.net/...

However when live in production your account may reside in one of many different data centers. For example, some possible sites are:

https://www.docusign.net/
https://na2.docusign.net/
https://na3.docusign.net/
https://eu.docusign.net/
...

I see you mention you are using Postman to test production API requests using https://www.docusign.net/... as you base, have you confirmed this is the correct base URI for your user/account? It's possible the account resides in a different data center and that would make sense why you are getting an invalid credentials error as it's not the right account.

Determining the correct base_uri for a given user of your app is done during the OAuth process, you need to make the Get User Info call and parse the base_uri that is returned in the response and use THAT for subsequent API calls.