Generate access token via eSignature API

Add the option of finding text and signature fields automatically in a document using the airSlate SignNow API. Magic fields ensure that nothing important is missed when filling out a document.

  • Free to test
  • Fast to deploy
  • Powerful & secure

Make it easy for recipients to fill your document by detecting fillable fields.

Make workflow prompt and smooth by doing everything in one go with magic fields.

                                        const signnow = require('@signnow/api-client')({
  credentials: 'BASE64_ENCODED_CLIENT_CREDENTIALS',
  production: true, // if false then uses eval server
});
const addTextField = signnow.document.update;
 
const id = 'DOCUMENT_ID_GOES_HERE';
const token = 'YOUR_ACCESS_TOKEN';
 
/**
 * @typedef {Object} SignatureField
 * @property {number} page_number - page number of document
 * @property {string} type - type of field
 * @property {string} name - unique name of the field
 * @property {string} role - role name
 * @property {boolean} required - required field
 * @property {number} height - height of the field
 * @property {number} width - width of the field
 * @property {number} x - X coordinate of the field
 * @property {number} y - Y coordinate of the field
 * @property {?string} prefilled_text - prefilled value of a field
 * @property {?string} validator_id - input validator id
 * @property {?string} label
 */
 
/**
 * @type {Object}
 * @property {number} client_timestamp - local time of user
 * @property {SignatureField[]} fields
 */
const fields = {
  client_timestamp: 1527859375,
  fields: [
    {
      page_number: 0,
      type: 'text',
      name: 'TextName',
      role: 'Singer 1',
      prefilled_text: '123',
      validator_id: '1f9486ae822d30ba3df2cb8e65303ebfb8c803e8',
      label: 'TextLabel',
      required: true,
      height: 40,
      width: 50,
      x: 217,
      y: 120,
    },
  ],
};
 
/**
 * @param {Object} res
 * @param {string} res.id - an id of document
 * @param {Object[]} res.signatures - signature and initial elements
 * @param {Object[]} res.texts - text and enumeration elements
 * @param {Object[]} res.checks - checkbox elements
 * @param {Object[]} res.attachments - attachment elements
 * @param {Object[]} res.radiobuttons - radiobutton elements
 */
const handleResponse = res => {
  console.log(res);
};
 
const handleError = err => {
  console.error(err);
};
 
addTextField({
  id,
  fields,
  token,
}, (err, res) => {
  if (err) {
    handleError(err);
  } else {
    handleResponse(res);
  }
});
                                    
                                        public abstract class FieldRequestBase
    {
        public abstract string type { get; }
        public bool required { get; set; }
        public string template_field_id { get; set; }
        public string role { get; set; }
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string name { get; set; }
        public int page_number { get; set; }
        public int x { get; set; }
        public int y { get; set; }
        public int width { get; set; }
        public int height { get; set; }
    }
    public class DocumentUpdateRequestModel
    {
        public List fields { get; private set; } = new List();
    }
    public class SignatureFieldRequest : FieldRequestBase
    {
        public override string type { get { return "signature"; } }
    }
    class Program
    {
        static void Main(string[] args)
        {
            var accessToken = "Your ACCEES TOKEN";
            var apiBaseUrl = "airSlate SignNow API URL e.g.: https://api-eval.signnow.com";
            var documentId = "Your document ID";var documentUpdateRequest = new DocumentUpdateRequestModel();
            var signatureField = new SignatureFieldRequest
            {
                height = 40,
                width = 50,
                name = "Sign",
                page_number = 0,
                required = true,
                role = "Signer 1",
                x = 10,
                y = 10
            };
            documentUpdateRequest.fields.Add(signatureField);
            AddFillableFields(accessToken, apiBaseUrl, documentId, documentUpdateRequest);
        }
        public static void AddFillableFields(string accessToken, string apiUrl, string documentId, DocumentUpdateRequestModel documentUpdateRequest)
        {
            var client = new RestClient { BaseUrl = new Uri(apiUrl) };
            var request = new RestRequest($"/document/{documentId}", Method.PUT)
                .AddHeader("Accept", "application/json")
                .AddHeader("Authorization", $"Bearer {accessToken}");
            request.RequestFormat = DataFormat.Json;
            var requestJson = JsonConvert.SerializeObject(documentUpdateRequest);
            request.AddBody(requestJson);
            var response = client.Execute(request);if (response.StatusCode != HttpStatusCode.OK)
            {
                throw new Exception(response.Content);
            }
        }
    }
                                    
                                        try {
    //Signature field
    Document.Field sign = new Document.Field();
    sign.x = 10;
    sign.y = 10;
    sign.height = 30;
    sign.width = 150;
    sign.type = Document.FieldType.SIGNATURE;
    sign.required = true;
    sign.pageNumber = 0;
    sign.role = "Signer role";
    sign.label = "Your signature here";
     
    //Text field
    Document.Field text = new Document.Field();
    text.x = 10;
    text.y = 60;
    text.height = 30;
    text.width = 150;
    text.type = Document.FieldType.TEXT;
    text.required = false;
    text.pageNumber = 0;
    text.role = "Signer role";
    text.label = "Fill in value here";
     
    //update document fields
    cli.documentsService().updateDocumentFields(documentId, Arrays.asList(sign, text));
} catch (SNException e) {
    e.printStackTrace();
}
                                    
                                        import signnow_python_sdk
from datetime import datetime

if __name__ == '__main__':
    signnow_python_sdk.Config(client_id="CLIENT_ID",
                              client_secret="CLIENT_SECRET",
                              environment="production")

    # Enter your own credentials
    username = "USER_NAME"
    password = "USER_PASSWORD"
    template_id = "TEMPLATE_ID"

    # Create access_token for the user
    access_token = signnow_python_sdk.OAuth2.request_token(username, password, '*')

    # Create the PUT /document payload
    doc_payload = {
        "texts": [
            {
                "size": 22,
                "x": 61,
                "y": 72,
                "page_number": 0,
                "font": "Arial",
                "data": "a sample text element",
                "line_height": 9.075,
                "client_timestamp": datetime.now().strftime("%s")
            }
        ],
        "fields": [
            {
                "x": 61,
                "y": 100,
                "width": 120,
                "height": 34,
                "page_number": 0,
                "role": "Signer 1",
                "required": True,
                "type": "signature"
            },
            {
                "x": 61,
                "y": 160,
                "width": 120,
                "height": 12,
                "page_number": 0,
                "label": "New Label",
                "role": "Signer 1",
                "required": True,
                "type": "text"
            },
            {
                "x": 61,
                "y": 178,
                "width": 41,
                "height": 26,
                "page_number": 0,
                "role": "Signer 2",
                "required": True,
                "type": "initials"
            }
        ]
    }

    # Update document template with payload
    put_doc_response = signnow_python_sdk.Template.update(access_token['access_token'], template_id, doc_payload)
                                    
                                        curl -X PUT \

  https://api.signnow.com/document/{{document_id}} \

  -H 'Authorization: Bearer {{access_token}}’\

  -H 'Content-Type: application/json' \

  -d '{

  "fields": [

{

    "x": 305,

    "y": 18,

    "width": 122,      

    "height": 10,

    "page_number": 0,

    "label": "first_name",

    "role": "Signer",

    "required": true,

    "type": "text",

    "prefilled_text":"John"

  },

  {

    "x": 305,

    "y": 38,

    "width": 122,      

    "height": 10,

    "page_number": 0,

    "label": "last_name",

    "role": "Signer",

    "required": true,

    "type": "text",

    "prefilled_text":"Doe"

  },

  {

    "x":305,

    "y":67,

    "width":100,

    "height":34,

    "page_number":0,

    "label":"a sample label",

    "role":"Signer",

    "required":true,

    "type":"signature"

  }

]

}'
                                    
  • We provide developers with complete SDKs for all popular languages, allowing them to integrate eSignature workflows without writing a single line of code.
  • With our detailed documentation, integrating the airSlate SignNow API is a breeze.
  • The airSlate SignNow API not only provides you with eSignatures: use it to create fillable forms, request payments, and download & archive documents using simple API calls.

airSlate SignNow regularly wins awards for ease of use and setup

Read our reviews on the trusted resources

Tech Data uses airSlate SignNow to improve our internal and external customer service while increasing our speed to revenue.
Bob Dutkowsky CEO
Bob Dutkowsky | CEO

Select an API package for your business

Integrate eSignatures into your software and get 250 legally-binding signature invites with your API free trial.

Check API pricing

Solution engineers

We are here to help you configure eSignature API to your workflow.

Review airSlate SignNow’s API documentation

The detailed API tutorial will guide you through the entire integration process and provide clear coding examples.

Video guides

Watch our video guides for instructions on how to easily build custom integrations.

Start with any of our SDKs

Get complete SDKs for Node.js, Python,
PHP, Java, C#.

Enterprise-grade security and compliance

airSlate SignNow is committed to protecting your sensitive information by complying with global industry-specific security standards.

GDPR compliance
GDPR compliance
Regulates the use and holding of personal data belonging to EU residents.
SOC 2 Type II Certified
SOC 2 Type II Certified
Guarantees the security of your data & the privacy of your clients.
PCI DSS certification
PCI DSS certification
Safeguards credit/debit card data for every monetary transaction a customer makes.
21 CFR Part 11
21 CFR Part 11
FDA-backed standards for electronic documentation and electronic signatures.
HIPAA compliance
HIPAA compliance
Protects the private health information of your patients.
CCPA compliance
CCPA compliance
Enhances the protection of personal data and the privacy of California residents.

Watch the airSlate SignNow API in action

Get started with uninterrupted eSignature API: generate access token via eSignature API

Consolidate and streamline your eSignature workflows and establish seamless processes. Try the airSlate SignNow API, implement eSignature workflows into your custom apps and websites in minutes, and seamlessly generate access token via eSignature API.

Generate access token via eSignature API the airSlate SignNow API for uninterrupted eSignature API

  1. Click API on the airSlate SignNow main page and create your API Sandbox account.
  2. Open your email to confirm the registration and specify a password for accessing your Developer Sandbox environment.
  3. Find the list of your apps at the top of the page. By default, you can also find a Test App for testing the API.
  4. Click its name to access the Client ID and Basic Authorization Token.
  5. Launch the API using the information from the previous step.
  6. Use the code samples from the airSlate SignNow library.
  7. When you're ready to go live, go to your airSlate SignNow account and choose a subscription plan.
  8. If you can't find a subscription that suits your needs, contact the Sales team.
  9. Change the test URL in your requests to the production environment URL.
  10. Delight your customers and partners with a streamlined eSignature experience.

The airSlate SignNow API is straightforward to embed, test, and operate (no vendor engaged). Get the ability to generate access token via eSignature API conveniently. Choose airSlate SignNow for more effective eSignature workflows.

How it works

Create an account and access the API Dashboard
Copy required code from the library to generate access token via eSignature API
Track how your productivity grows with accelerated workflows

Watch our instructions to build custom integrations with ease

airSlate SignNow offers a free testing environment to explore the eSignature.

Trusted eSignature solution — what our customers are saying

Explore how the airSlate SignNow eSignature platform helps businesses succeed. Hear from real users and what they like most about electronic signing.

This service is really great! It has helped...
5
anonymous

This service is really great! It has helped us enormously by ensuring we are fully covered in our agreements. We are on a 100% for collecting on our jobs, from a previous 60-70%. I recommend this to everyone.

Read full review
01  / 03

Ready to get started?

FAQs

Below is a list of the most common airSlate SignNow API questions and answers. Just choose a question to view a detailed answer.

Need help? Contact support

Searches related to Electronic Signature API

signnow api

Ready to get started?

It’s time to watch the airSlate SignNow API in action. Create your developer account and upload documents, request signatures, and check the status of your document.

Why choose the airSlate SignNow API?:

  • Free to test and easy to deploy
  • SDKs for popular languages
  • Customizable for any workflow
  • Industry-leading security & compliance
Sign up with Google