0
votes

I'm using the python SDK for Docusign API. I created an integration in the sandbox and successfully promoted the integrator key to a production account.

I retrieved the integrator key, API Acccount ID and API Username from Admin > API and Keys on Docusign.com for the production account. I successfully obtained consent and successfully get a token via configure_jwt_authorization_flow().

However, when I try to make an API call with the token I get: USER_DOES_NOT_BELONG_TO_SPECIFIED_ACCOUNT.

If I use /oauth/userinfo with my token, I get same Username and Account ID that I retrieved above from the Docusign web page.

I haven't posted any code because the code works with my Sandbox account. I just don't understand why the information from the API and Keys page on the website isn't working.

The crazy thing is that I'm logging in as the user in Docusign to obtain the account information. Why doesn't the API think the user is part of that account?

Any help will be much appreciated.

Thanks

1

1 Answers

1
votes

Answering my own question in case it helps someone else...

I was using the wrong "Base URL" in production (i.e. https://www.docusign.net/restapi). You need to determine your custom endpoint based on your account. Like this:

curl -i -H "Accept: application/json" -H 'X-DocuSign-Authentication:{"Username": "[email protected]","Password": "yourOwnPassword", "IntegratorKey": "yourOwnIntegratorKey"}' -X GET https://www.docusign.net/restapi/v2/login_information

The result will be something like:

{ "loginAccounts": [ { "name": "John Dough", "accountId": "12345", "baseUrl": "https://na2.docusign.net/restapi/v2/accounts/12345", "isDefault": "true", "userName": "John Dough", "userId": "02e6fc42-0c2e-4e8e-ade1-8ed6f140daee", "email": "[email protected]", "siteDescription": "" } ] }

Use the returned value of baseUrl for your integration.(https://na2.docusign.net/restapi).