Baxter
Baxter

Reputation: 5845

Docusign Permissions: Shared Envelopes vs. Shared Access

I have been using the "Shared Envelopes" feature to allow specific users who are not the sender or a recipient of the envelope to be able to view an envelope in my application without any issues. I used the following instructions to do so:

How to embed the DocuSign UI in your app: https://developers.docusign.com/docs/esign-rest-api/how-to/embed-ui/
This lays out using the SDK method Envelopes::createConsoleView.

However, DocuSign has deprecated "Shared Envelopes" in favor of their new "Shared Access". I removed the users from the "Shared Envelopes" of the sending account and added them to "Shared Access" of the sending account. Unfortunately, when I make this change the users can no longer view the envelope and receive the following error message:

Error calling CreateConsoleView: {"errorCode":"USER_NOT_ENVELOPE_SENDER_OR_RECIPIENT","message":"This user is not the sender or a recipient of the envelope. Only the sender or a recipient of the envelope may perform the requested operation."}

Here is my code:

//API - EnvelopeViews:createConsoleView
public string GetEnvelopeViewUrl(string accountId, string envelopeId, string returnUrl)
{
    var token = _tokenService.FetchToken(accountId);
    var apiClient = new DocuSignClient($"{token.Account.BaseUri}/restapi");
    apiClient.Configuration.DefaultHeader.Add("Authorization", $"Bearer {token.Value}");
    var envelopesApi = new EnvelopesApi(apiClient);
    var apiAccountId = _config["DocuSign:ApiAccountId"];

    ConsoleViewRequest viewRequest = new ConsoleViewRequest
    {
        EnvelopeId = envelopeId,
        ReturnUrl = returnUrl
    };

    var recipientView = envelopesApi.CreateConsoleView(apiAccountId, viewRequest);
    return recipientView.Url;
}

I know the users in my app are not the sender or a recipient of the envelope. I thought that was the whole point of "Shared Access". Can anyone provide some guidance on how to enable the new "Shared Access" users to be able to view an envelope like they can with the old "Shared Envelopes" in my application?

Upvotes: 1

Views: 744

Answers (1)

Inbar Gazit
Inbar Gazit

Reputation: 14050

Baxter, as of right now (November 2022) the new feature for Shared Access is only to support using the web app and does not provide any functionality for developers using the API. The old feature, like you mentioned, called shared envelopes, was fully supporting the API and the call you made would work with that. There's a future plan to support the API using Shared Access, but I don't know the details or the date. I can update this answer once I have this information.

Upvotes: 1

Related Questions