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.
docuSignr
is available on CRAN and Github.
```{R, eval = FALSE}
install.packages("docuSignr")
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. ```{R,eval =FALSE} Sys.setenv("docuSign_username" = "username") Sys.setenv("docuSign_password" = "password") Sys.setenv("docuSign_integrator_key" = "integrator_key")
```{R, eval = FALSE} library(docuSignr)
login <- docu_login()
templates <- docu_templates(base_url = login[1, "baseUrl"])
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" )
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" )
browseURL(URL)
```
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.