SDKs overview

Jotform provides a RESTful API that allows developers to integrate Jotform's form-building and data collection capabilities directly into their applications. To facilitate this integration, Jotform offers official Software Development Kits (SDKs) for several popular programming languages. These SDKs abstract much of the complexity involved in making direct HTTP requests, handling authentication, and parsing responses, enabling developers to interact with the Jotform API using native language constructs.

The primary functions accessible through the SDKs include creating and managing forms, retrieving and submitting form data, managing user accounts, and accessing report data. By using an SDK, developers can reduce development time and potential errors compared to building API request logic from scratch. The API itself is well-documented, with a comprehensive API reference available on the Jotform API documentation portal.

Official SDKs by language

Jotform maintains official SDKs to support developers in various environments. These SDKs are designed to provide a consistent and reliable interface to the Jotform API. The table below outlines the key official SDKs, their respective package managers, and installation commands.

Language Package Name Installation Command Maturity
PHP jotform-api-php composer require jotform/jotform-api-php Stable
Python jotform-api-python pip install jotform-api-python Stable
Ruby jotform-api-ruby gem install jotform-api-ruby Stable
Java jotform-api-java (Maven/Gradle dependency) Stable
JavaScript (Node.js) jotform-api-nodejs npm install jotform-api-nodejs Stable
C# JotformApi.Net dotnet add package JotformApi.Net Stable

Each SDK is typically hosted on its respective language's package manager and includes detailed documentation and examples on its GitHub repository or within the Jotform developer resources.

Installation

Installing a Jotform SDK generally follows the standard practices for each programming language's ecosystem. Below are common installation steps for the most frequently used SDKs.

PHP SDK Installation

The PHP SDK is available via Composer, the dependency manager for PHP. To install:

composer require jotform/jotform-api-php

After installation, you can include the Composer autoloader in your PHP script to start using the SDK:

require 'vendor/autoload.php';
$jotformAPI = new JotformAPI(API_KEY);

Python SDK Installation

The Python SDK can be installed using pip, the Python package installer:

pip install jotform-api-python

Once installed, you can import the library and initialize the client:

from JotformAPI import JotformAPI
jotformAPI = JotformAPI("YOUR_API_KEY")

JavaScript (Node.js) SDK Installation

For Node.js environments, the JavaScript SDK is available through npm:

npm install jotform-api-nodejs

Then, require the module and instantiate the client:

const JotformAPI = require('jotform-api-nodejs');
const jotformAPI = new JotformAPI('YOUR_API_KEY');

Java SDK Installation

For Java projects, the Jotform API client can be included as a dependency in your pom.xml (for Maven) or build.gradle (for Gradle). Consult the specific Jotform Java SDK documentation for the latest dependency coordinates.

C# SDK Installation

The C# SDK can be added to your .NET project using NuGet Package Manager:

dotnet add package JotformApi.Net

After installation, you can initialize the client in your C# code:

using Jotform; 
var jotformClient = new JotformAPIClient("YOUR_API_KEY");

Quickstart example

This Python example demonstrates how to initialize the Jotform API client, retrieve a list of forms associated with your account, and then fetch details for a specific form. This process requires an API key, which can be generated from your Jotform account settings.

First, ensure you have installed the Python SDK:

pip install jotform-api-python

Then, use the following Python code snippet:

from JotformAPI import JotformAPI
import os

# Replace 'YOUR_API_KEY' with your actual Jotform API key
# It is recommended to store API keys in environment variables for security
API_KEY = os.getenv('JOTFORM_API_KEY', 'YOUR_API_KEY') 

if API_KEY == 'YOUR_API_KEY':
    print("Warning: Replace 'YOUR_API_KEY' or set JOTFORM_API_KEY environment variable.")
    exit()

try:
    # Initialize the Jotform API client
    jotformAPI = JotformAPI(API_KEY)
    print("Jotform API client initialized.")

    # Get a list of all forms
    print("\nFetching forms...")
    forms = jotformAPI.getForms()

    if forms:
        print(f"Found {len(forms)} forms:")
        for form in forms:
            print(f"- Form ID: {form['id']}, Title: {form['title']}")
            
        # Example: Get details for the first form found
        first_form_id = forms[0]['id']
        print(f"\nFetching details for form ID: {first_form_id}...")
        form_details = jotformAPI.getForm(first_form_id)
        
        if form_details:
            print(f"Form Details for '{form_details['title']}':")
            print(f"  Status: {form_details['status']}")
            print(f"  Created: {form_details['created_at']}")
            print(f"  Submissions: {form_details['count']}")
        else:
            print(f"Could not retrieve details for form ID: {first_form_id}.")
    else:
        print("No forms found for this account.")

except Exception as e:
    print(f"An error occurred: {e}")

This example demonstrates basic interaction with the Jotform API: authentication, listing resources (forms), and retrieving specific resource details. For more advanced operations, such as creating submissions or managing users, refer to the Jotform API documentation.

Community libraries

While Jotform provides robust official SDKs, the broader developer community often contributes additional libraries, connectors, and integrations that extend functionality or provide support for less common use cases or languages. These community-driven projects can offer alternative approaches or specialized features not found in the official offerings.

Developers often share these tools on platforms like GitHub, npm, or other language-specific package repositories. Searching these platforms for jotform along with the desired programming language (e.g., jotform golang or jotform rust) can reveal community-contributed libraries. For instance, a community might develop a wrapper for a language without an official SDK or create a specific integration with a third-party service like a workflow automation platform. An example of a common pattern for community contributions is the development of OpenAPI client generators, which can produce SDKs for virtually any language based on the API's OpenAPI specification. An OpenAPI Specification defines a standard, language-agnostic interface to REST APIs.

When considering community libraries, it is crucial to evaluate their maintenance status, documentation quality, and active community support, as these aspects can vary significantly. Always review the source code and licensing before incorporating third-party libraries into production environments. The Jotform developer community forums and GitHub are good starting points for discovering and discussing community-contributed tools.