Skip to content

Instantly share code, notes, and snippets.

@Ergin008
Ergin008 / requestSigTemplate.m
Last active January 4, 2016 10:29
Temp Objective-C Walkthrough
//
// API Walkthrough 1 - Signature Request via Template (Objective-C)
//
// To run this sample:
// 1. Copy the below code into your iOS project
// 2. Enter email, password, integrator key, name, templateId, and roleName and save
// 3. Compile and Run
//
// Enter your info:
@Ergin008
Ergin008 / CreateAndSendEnvelope.java
Last active January 7, 2016 00:36
code snippet that shows how to create and send an envelope using the DocuSign Java Client
// specify a document we want signed
String SignTest1File = "[PATH/TO/DOCUMENT/TEST.PDF]";
// create a byte array that will hold our document bytes
byte[] fileBytes = null;
try
{
String currentDir = System.getProperty("user.dir");
// read file from a local directory
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
// install DocuSign NuGet package or download source from GitHub:
// https://www.nuget.org/packages/DocuSign.Integration.Client.dll/
using DocuSign.Integrations.Client;
@Ergin008
Ergin008 / LoginAPI.java
Last active September 5, 2016 06:28
code snippet that shows the Login API
// Download API Client and add to your project:
// https://github.com/docusign/docuSign-java-client
import com.docusign.esign.api.*;
import com.docusign.esign.client.*;
import com.docusign.esign.model.*;
// Enter your DocuSign credentials
String UserName = "[EMAIL]";
String Password = "[PASSWORD]";
String IntegratorKey = "[INTEGRATOR_KEY]";
// specify a document we want signed
String SignTest1File = "[PATH/TO/DOCUMENT/TEST.PDF]";
// create a byte array that will hold our document bytes
byte[] fileBytes = null;
try
{
String currentDir = System.getProperty("user.dir");
@Ergin008
Ergin008 / getRecipientView.java
Last active January 6, 2016 22:00
code snippet that shows how to request a recipient signing URL
// use the |accountId| we retrieved through the Login API
String accountId = loginAccounts.get(0).getAccountId();
// instantiate a new EnvelopesApi object
EnvelopesApi envelopesApi = new EnvelopesApi();
// set the url where you want the recipient to go once they are done signing
RecipientViewRequest returnUrl = new RecipientViewRequest();
returnUrl.setReturnUrl("https://www.docusign.com/devcenter");
returnUrl.setAuthenticationMethod("email");
@Ergin008
Ergin008 / LoginAPI.cs
Last active July 9, 2016 02:15
code snippet that shows how to Login using DocuSign .NET client
// Download API Client and add to your project:
// https://github.com/docusign/docusign-csharp-client
using DocuSign.eSign.Api;
using DocuSign.eSign.Model;
using DocuSign.eSign.Client;
// Enter your credentials
string Username = "[EMAIL]";
string Password = "[PASSWORD]";
string IntegratorKey = "[INTEGRATOR_KEY]";
@Ergin008
Ergin008 / CreateEnvelopeWithEmbeddedRecipient.cs
Last active July 9, 2016 02:17
code snippet that shows how to create an envelope using the DocuSign .NET client
// specify the document we want signed
string SignTest1File = @"[PATH/TO/DOCUMENT/TEST.PDF]";
// read a file from disk to use as a document.
byte[] fileBytes = File.ReadAllBytes(SignTest1File);
EnvelopeDefinition envDef = new EnvelopeDefinition();
envDef.EmailSubject = "[DocuSign C# SDK] - Please sign this doc";
// Add a document to the envelope
@Ergin008
Ergin008 / getRecipientView.cs
Last active January 7, 2016 23:17
code snippet that shows how to request a signing URL for a recipient
RecipientViewRequest viewOptions = new RecipientViewRequest()
{
ReturnUrl = "https://www.docusign.com/devcenter",
ClientUserId = "1234", // must match clientUserId set in step #2!
AuthenticationMethod = "email",
UserName = "[SIGNER_NAME]",
Email = "[SIGNER_EMAIL]"
};
// create the recipient view (aka signing URL)
@Ergin008
Ergin008 / LoginAPI.php
Last active March 21, 2016 23:23
code snippet that shows DocuSign Login API call using PHP client
<?php
require_once('./docusign-php-client/autoload.php');
// DocuSign account credentials & Integrator Key
$username = "[USERNAME]";
$password = "[PASSWORD]";
$integrator_key = "[INTEGRATOR_KEY]";
// DocuSign environment we are using