1

I'm getting an invalid request error message while trying to obtain an Oauth token from the Docusign API. I can't figure out what could be wrong here, the error is also reproducible using the DocuSign API explorer (http://iodocs.docusign.com/). See the request and response below:

Request

{ "uri": "https://demo.docusign.net/restapi/v2/oauth2/token", "method": "POST", "headers": { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", "Content-Length": 145 }, "body": "username=MY@USER.COM&password=MYPASSWORD&client_id=MYINTEGRATORKEY&grant_type=password&scope=api" }

Response

{ "error": "invalid_request", "error_description": "An entry with the same key already exists." }

I've tried with different keys and i'm getting the same result. This call was working before but it's now throwing this exception. Any ideas?

1 Answers1

1

The error message is not very helpful and needs to be changed, but this occurs when you have reached your limit for OAuth tokens. You are allowed 10 OAuth tokens in your account, and this error occurs when you reach your limit. To resolve login to your demo DocuSign Console at demo.docusign.com and in the top right click on your profile icon and go to

Preferences -> Connected Apps

From there you should see a list of your OAuth keys. If you have 10 listed, then that's most likely your problem. Try revoking one and that will allow you to create a new token...

enter image description here

Ergin
  • 9,254
  • 1
  • 19
  • 28
  • I just looked in my DocuSign sandbox and there's only 3 active tokens, so it doesn't seem to be related to the number of tokens. Any other ideas? – jonathanrico Aug 20 '13 at 00:34
  • Do you only have one sandbox or is it possible you were checking a different account? And you've tested again since right? I've been testing and I get that same error when I request a new token when I have 10 already. In fact I even logged a bug on DocuSign's side for this. – Ergin Aug 20 '13 at 05:15
  • yep, double checked it's the same account.. I even tried with 2 different sandboxes and made sure the request are sending the right user credentials. These sandboxes were created a few months ago, I'll try creating a new one. – jonathanrico Aug 20 '13 at 06:09
  • just created a new sandbox and tried using the new credentials with both, my integration and the docusign api explorer and i'm getting the same error... – jonathanrico Aug 21 '13 at 01:14
  • Am I really the only one getting this exception with sandboxes? This sounds like there's something wrong with DocuSign sandboxes... – jonathanrico Aug 21 '13 at 22:58