This sample application demonstrates how the signNow API and PHP SDK can be used to construct applications with signing flows. This sample application operates using the following features:
Try using the sample application for testing purposes or use it as a skeleton for your own application. To create an application that generates legally binding signatures, you’ll need a signNow subscription.
- Create a signNow account:
- For integration purposes, you need a signNow account with a paid subscription.
- For testing purposes, you can create a signNow developer account.
- At the API Dashboard, create an application.
- Use your signNow credentials and basic authorization token in your config file
.env
.
The configuration file is located in the project directory with the common name .env
.
Configure the following variables to ensure the application’s proper functionality.
Variable | Example | Description |
---|---|---|
SN_API_HOST | https://api.signnow.com |
signNow API host |
SN_API_BASIC_TOKEN | c2lnbk5vdyBBUEkgc2FtcGxlIEFwcCB2MS4wCg== |
Find your basic token at the API Dashboard. |
SN_API_USER | [email protected] |
The email address of the document signer. |
SN_API_PASSWORD | ***** |
Your signNow account password. |
SN_SIGNER_EMAIL | [email protected] |
The email address of the person who is supposed to sign a document. |
View the entire configuration file, including standard Laravel variables, here.
-
Clone the repository
git clone [email protected]:signnow/sample-app.git
-
Build a docker image using the following command:
make build
-
Start the
signnow-sample-app
docker container using the following command:make up
-
Install dependencies and generate a Laravel application key using the following command:
make setup
This command will also prepare your configuration
.env
file and prompt you to enter all the required parameters. Make sure that you have the following data at hand:- Basic token for your application.
- The email address that your signNow account is registered with.
- Your signNow password.
- The email address of the person who is supposed to sign a document.
-
Clear the cache using the following command (optionally):
make clear
-
Open a browser to localhost:8080.
Technology:
- PHP 8.2
- Laravel 10
- signNow API PHP SDK 2.2
- Docker
- Native JavaScript
- HTML
- Bootstrap CSS Framework
The application contains both backend and tiny frontend components. The frontend consists of a web form where you can enter the first and last names of your signer and a comment.
After the form is submitted, the backend uploads the PDF file to signNow using your credentials provided with the .env
configuration file. The backend also adds the first and last names and comment fields to the document. The backend then creates an embedded invite to sign your document and generates a link for the invite. This type of invite is called 'embedded' because you can integrate it into your website or mobile application.
The frontend receives the invite link and embeds the signNow document editor into a website or app using an <iframe/>
tag. Using this method, the signing session is built into the website. You can also customize the signing experience by using the branding feature. All backend operations are performed using the signNow PHP SDK.
Topic | URL |
---|---|
signNow website | https://www.signnow.com/ |
PHP SDK | https://github.com/signnow/SignNowPHPSDK |
signNow documentation | https://docs.signnow.com/ |
This repository is under the MIT license. You are free to use the code of this application as a skeleton for your application. For more information, see LICENSE.