Skip to content

Devdocs 1178 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using DocuSign.eSign.Api;
using DocuSign.eSign.Model;
using eg_03_csharp_auth_code_grant_core.Models;
using System.Text;
using Microsoft.AspNetCore.Mvc;
using System.Text;
using DocuSign.eSign.Client;

namespace eg_03_csharp_auth_code_grant_core.Controllers
Expand All @@ -20,7 +20,6 @@ public Eg019AccessCodeAuthController(DSConfiguration config, IRequestItemsServic

public override string EgName => "eg019";


[HttpPost]
public IActionResult Create(string signerEmail, string signerName, string accessCode)
{
Expand All @@ -37,14 +36,12 @@ public IActionResult Create(string signerEmail, string signerName, string access

// Data for this method:
// signerEmail
// signerName

// signerName
var basePath = RequestItemsService.Session.BasePath + "/restapi";
var recipientId = Guid.NewGuid().ToString();

// Step 1: Obtain your OAuth token
var accessToken = RequestItemsService.User.AccessToken;
var accountId = RequestItemsService.Session.AccountId;
var accessToken = RequestItemsService.User.AccessToken; //represents your {ACCESS_TOKEN}
var accountId = RequestItemsService.Session.AccountId; //represents your {ACCOUNT_ID}

// Step 2: Construct your API headers
var config = new Configuration(new ApiClient(basePath));
Expand Down Expand Up @@ -80,7 +77,7 @@ public IActionResult Create(string signerEmail, string signerName, string access
DocumentId = "1",
// A 1- to 8-digit integer or 32-character GUID to match recipient IDs on your own systems.
// This value is referenced in the Tabs element below to assign tabs on a per-recipient basis.
RecipientId = recipientId
RecipientId = "1" //represents your {RECIPIENT_ID}
};

// Tabs are set per recipient/signer
Expand All @@ -96,12 +93,11 @@ public IActionResult Create(string signerEmail, string signerName, string access
RoutingOrder = "1",
Status = "Created",
DeliveryMethod = "Email",
RecipientId = recipientId,
AccessCode = accessCode,
RecipientId = "1", //represents your {RECIPIENT_ID}
AccessCode = accessCode, //represents your {ACCESS_CODE}
Tabs = signer1Tabs
};


Recipients recipients = new Recipients();
recipients.Signers = new List<Signer> { signer1 };
env.Recipients = recipients;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="form-group">
<label for="accessCode">Access Code</label>
<input type="text" class="form-control" id="accessCode" name="accessCode"
aria-describedby="acText" placeholder="Rnter a recipient access code here" required>
aria-describedby="acText" placeholder="Enter a recipient access code here" required>
<small id="acText" class="form-text text-muted">Provide this string to a recipient that is different such as in person or by mail or via different email.</small>
</div>
<div class="form-group">
Expand Down