API Authentication

FormAPI uses API tokens for authentication. You must authenticate using HTTP basic authentication. Use your API token ID as the username, and the API token secret as the password.

You must send an Authorization header with the value Basic followed by base 64 encoded token_id:token_secret.

For example: Authorization: Basic dG9rZW5faWQ6dG9rZW5fc2VjcmV0Cg==

You can manage your API tokens on the API Tokens page.

Our API includes an /authentication endpoint that you can use to make sure your API tokens are valid.

Test Authentication

// This is a live example that you can run with Node

var FormAPI = require("@formapi/formapi");

var config = new FormAPI.Configuration();
config.apiTokenId = "yRaaR9JmTPtGX7EN";
config.apiTokenSecret = "IB3TRkSdm4f2BdtU_D3YgxjdMB7l-r2fOgvxD1Yzwec";
client = new FormAPI.Client(config);

client.testAuthentication(function(error, response) {
  if (error) throw error;
  console.log(response);
});
require 'form_api'

ENV['FORMAPI_TOKEN_ID'] = 'yRaaR9JmTPtGX7EN'
ENV['FORMAPI_TOKEN_SECRET'] = 'IB3TRkSdm4f2BdtU_D3YgxjdMB7l-r2fOgvxD1Yzwec'

FormAPI.configure do |config|
  config.api_token_id = ENV['FORMAPI_TOKEN_ID']
  config.api_token_secret = ENV['FORMAPI_TOKEN_SECRET']
end

formapi = FormAPI::Client.new
formapi.test_authentication
# => #<FormAPI::InlineResponse200:0x012389abcdef @status="success">
import form_api

client = form_api.Client()
client.api_client.configuration.api_token_id = "yRaaR9JmTPtGX7EN"
client.api_client.configuration.api_token_secret = "IB3TRkSdm4f2BdtU_D3YgxjdMB7l-r2fOgvxD1Yzwec"

client.test_authentication()
# => {'status': 'success'}
<?php
// This is a live example that you can run in the PHP interactive shell (php -a)
$formapi = new FormAPI\Client();
$formapi->getConfig()->setUsername('yRaaR9JmTPtGX7EN');
$formapi->getConfig()->setPassword('IB3TRkSdm4f2BdtU_D3YgxjdMB7l-r2fOgvxD1Yzwec');

echo $formapi->testAuthentication();
# => { "status": "success" }
using System;
using System.Diagnostics;
using FormApi.Client.Api;
using FormApi.Client.Client;
using FormApi.Client.Model;

namespace Example
{
    public class FormAPIExample
    {
        public void main()
        {
          Configuration.Default.Username = "yRaaR9JmTPtGX7EN";
          Configuration.Default.Password = "IB3TRkSdm4f2BdtU_D3YgxjdMB7l-r2fOgvxD1Yzwec";

          var apiInstance = new PDFApi();
          // Test Authentication
          AuthenticationSuccessResponse result = apiInstance.TestAuthentication();
          Debug.WriteLine(result);
        }
    }
}
curl -u FORMAPI_TOKEN_ID:FORMAPI_TOKEN_SECRET -X GET https://app.formapi.io/api/v1/authentication

# Live example:
curl -u yRaaR9JmTPtGX7EN:IB3TRkSdm4f2BdtU_D3YgxjdMB7l-r2fOgvxD1Yzwec -X GET https://app.formapi.io/api/v1/authentication

results matching ""

    No results matching ""