Curious-programmer
Curious-programmer

Reputation: 813

How to get impersonated UserGuid Id in docusign

I am trying to get the impersonated userguid from the docusign api. Per the documentation I need to call /restapi/v2/accounts/account_id/users?email=email, which is not working for me. I assume the full url would be https://admin.docusign.com/restapi/v2/accounts/account_id/users?email="[email protected]" . I am getting a 404 when entering my email in the above format.

Upvotes: 1

Views: 3170

Answers (3)

Dapper Dan
Dapper Dan

Reputation: 1062

In order to get Impersonate GUID ,

  1. Login to admin account
  2. Under setting options Click API and keys
  3. Value under the user id text box is Impersonate GUID enter image description here

Upvotes: 3

WTP
WTP

Reputation: 700

During configuration & setup:
1. You have an account admin enter information such as account, their userId ("API User Name" in web app). Save both items.
2. You follow the "consent flow", get their consent, generate a JWT and exchange for a token.
3. Use the /user_info call against the account server to get the list of their accounts. If more than one account in the array, find the one that matches what they entered in the configuration. Get and save the associated "base_uri". You will use that for all subsequent API calls.
Your application now has stored the account ID, the admin's "userId", and the base URI to built API URLs.

During business application operations: Admin is "Bob". Sender is "Jill" You need to get an access token for Jill. 1. Create JWT for Bob, exchange for access token, make GET /users?email={Jill's email). This gives you Jill's "userId".
2. Create JWT for Jill, exchange for access token.
3. Make API call as Jill, using her access token.

Upvotes: 1

Drew
Drew

Reputation: 5029

Looks like you have the incorrect domain. API Calls generally don't get made against admin.docusign.com. You'll want to make that call against the Application Server your account is on.

In the Sandbox environment that will be demo.docusign.net. In prod you'd need to make a UserInfo call to determine which server your account is on. It could be something like www.docusign.net or na2.docusign.net, but there are several possible domains.

Upvotes: 3

Related Questions