Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting userid based on email using DocuSign REST API

Tags:

docusignapi

I was looking into the api documentation but could not find an easy way to get a userID based on an email address, is this possible?

Here is what I am trying to do.

  • Get user id based on email address
  • Get list of groups that the user belongs to using /accounts/{accountId}/users/{userId}
  • Get the list of brands that those groups have using /accounts/{accountId}/groups/{groupId}/brands

Doing the above because I need to do a send of behalf of user and need to give the branding options for that user.

like image 836
Paul S. Avatar asked Sep 10 '26 14:09

Paul S.


1 Answers

To retrieve a User Id based on an email address, you can use this DocuSign REST API operation:

GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/[email protected]

If a match is found, the response will look like this:

{
    "users": [
        {
            "userName": "John Doe",
            "userId": "ah266e12-83a6-487c-a42b-ebad10e4cc6a",
            "userType": "CompanyUser",
            "userStatus": "active",
            "uri": "/users/ah266e12-83a6-487c-a42b-ebad10e4cc6a"
        }
    ]
}

Note: This isn't very well-documented -- the only place I see it mentioned in the REST API guide is in the Appendix that lists the REST API methods that correspond to various SOAP API operations. i.e., it says that if you were using the SOAP API operation CheckAccountMember, the REST API equivalent is https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/users?email=<email>.

like image 83
Kim Brandl Avatar answered Sep 14 '26 16:09

Kim Brandl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!