AllynWA
AllynWA

Reputation: 41

User does not have the permission to the CreateEnvelopeFromTemplates method

I created a demo account, and am trying to create a new document from a template that I have saved. Idea is that when user registers in an application, an NDA is sent out for that user to sign.

I have created the template and run through its process manually, and all works according to plan. However, when I use the C# API and call CreateEnvelopeFromTemplates(), I am getting the following error:

This User lacks sufficient permissions. User does not have the permision to the
CreateEnvelopeFromTemplates method

The code looks like:

var recipient = CreateRecipient(userId);
var template = GetNDATemplate();
var envelope = CreateNDAEnvelope();
var serviceClient = GetServiceClient();

EnvelopeStatus status = serviceClient.CreateEnvelopeFromTemplates(
    new TemplateReference[] { template },
    new Recipient[] { recipient },
    envelope, false);

The credentials I am using are the API Username, API Password and the API Integrator key from my dev sandbox account. I don't see anyplace in the Sandbox -> Preferences -> Permission Profiles or API settings that look like they impact this capability.

Any assistance is greatly appreciated!

Upvotes: 1

Views: 374

Answers (1)

AllynWA
AllynWA

Reputation: 41

Okay, this turns out to be an issue of me confusing the DocuSign API Account ID and the API UserName ID.

When creating the Envelope, you need the AccountID guid, when instancing the SOAP connection, you need the API UserId guid and Integrator key guid. The error is a touch confusing as at first glance it gives the impression that the user logged in correctly.

Upvotes: 1

Related Questions