Learn R Programming

docuSignr

DocuSign is the leader in online document signing. They provide a REST API which allows for embedded document signing in several server-side languages, not currently including R.

The docuSignr package uses httr to embed DocuSign into Shiny applications.

Installation

docuSignr is available on CRAN and Github.

# from CRAN
install.packages("docuSignr")
# from Github
devtools::install_github("CannaData/docuSignr")

Requirements

For docuSignr to function you will need several things:

  • DocuSign account
  • DocuSign integrator key
  • DocuSign templates
  • DocuSign envelopes

Set-Up

It is recommended that you set the DocuSign username, password, and integrator key as environmental variables idealy in your .Rprofile.

Sys.setenv("docuSign_username" = "username")
Sys.setenv("docuSign_password" = "password")
Sys.setenv("docuSign_integrator_key" = "integrator_key")

Example

library(docuSignr)
# login to get baseURL and accountID
login <- docu_login()
# load templates
templates <- docu_templates(base_url = login[1, "baseUrl"])
# create envelope
envelope <- docu_envelope(
  account_id = login[1, "accountId"],
  base_url = login[1, "baseUrl"],
  template_id = templates[1, "templateId"],
  template_roles = list(
    email = "example@example.com",
    name = "R-Test",
    roleName = "Patient",
    clientUserId = "1"
  ),
  email_subject = "R-Test",
  email_blurb = "R-Test"
)

# get URL
URL <- docu_embed(
  base_url = login[1, "baseUrl"],
  return_url = "https://www.google.com",
  envelope_id = envelope$envelopeId,
  # info here must be consistent with info in template_roles above
  signer_name = "R-Test",
  signer_email = "example@example.com",
  client_user_id = "1"
)

# sign document
browseURL(URL)

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Also see contributing.

Copy Link

Version

Install

install.packages('docuSignr')

Monthly Downloads

162

Version

0.0.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Carl Ganz

Last Published

October 22nd, 2017

Functions in docuSignr (0.0.3)

docu_envelope_status

Check status of envelope
docu_header

Create header for docuSign
docu_embedded_sign

Embedded docuSign
docu_envelope

Create document for particular instance to be signed
docu_list_envelopes

List envelopes since date
docu_login

Authenticate DocuSign
docu_templates

View templates
parse_response

Process results from POST or GET
docu_auth

Create XML authentication string
docu_download

Download Document from DocuSign