hellosign-embedded
Welcome!
HelloSign Embedded allows you to embed HelloSign signature requests and templates from within your web application.
For more information, review our API documentation.
Contents
Installation
npm
$ npm install hellosign-embedded
CDN links
HelloSign is also available over a CDN.
<script crossorigin src="https://unpkg.com/hellosign-embedded@1/umd/embedded.development.js"></script>
The version above is only meant for development, and is not suitable for production. A minified and optimized production version of HelloSign Embedded is available at:
<script crossorigin src="https://unpkg.com/hellosign-embedded@1/umd/embedded.production.min.js"></script>
To load a specific version of hellosign-embedded
, replace 1
with the version number, tag, or semver range. More information about how to use unpkg can be found here.
Usage
-
First you'll need an API key and Client ID. If you haven't done so yet, head on over to the API settings for your account on HelloSign and create an API App.
-
Import the library into your frontend app. The below example is using ES6 module imports.
import hellosign from 'hellosign-embedded';
If you have installed the library from our global CDN, it will be available at window.HelloSign
.
const hellosign = window.HelloSign;
-
Initialize the HelloSign Embedded client with your API app's client ID.
const CLIENT_ID = '0123456789abcdef0123456789abcdef';
hellosign.init(CLIENT_ID);
-
Use your HelloSign SDK of choice to create an embedded signature request and get the signing URL. An example of how this is done using the NodeJS API can be found in the demo in this repository.
-
Then, open the signature request.
hellosign.open({
url: signUrlFromSdk,
allowCancel: true,
debug: true,
skipDomainVerification: true
});
A list of available options can be found in the documentation for the open()
method below.
More information and examples can be found in the Embedded Signing Walkthrough in the official HelloSign API docs.
API
init()
hellosign.init(clientId)
Initializes the HellSign embedded library with the given client id.
Parameters
open()
hellosign.open(options)
Opens an embedded signature request in an iFrame with the given options.
Parameters
close()
hellosign.close()
Closes the embedded signature request.
Demo
There is a demo app available in this repository which is useful for examining how a simple HelloSign Embedded integration can work. To get it up and running, perform the following:
-
Clone this repo.
$ git clone git@github.com:HelloFax/hellosign-embedded.git
-
Run the setup script.
$ npm run setup
-
Start the demo.
$ npm run demo
-
If all has gone well, you should now be able to access the demo at http://localhost:3000.
In order to test out the demo, you'll need an API Key and Client ID for HelloSign's API. If you haven't done so yet, head on over to the API settings for your account on HelloSign and create an API App.
Other
TypeScript
TypeScript bindings for HelloSign Embedded are available in the DefinitelyTyped repo.
Copyright © 2018 HelloSign. All rights reserved. Contact us.