Documentation

Adding API connections

The API connections and their authentication are defined in the plugin settings. The API Connector plugin settings page can be accessed through Forms -> Settings.

Here you can configure the connection settings for the GravityWP API Connector plugin. It is possible to define multiple APIs, manage authentication methods, and set custom headers for requests. Once defined, these connections become available to select in the Form Feed settings, where you can map form fields to the API requests.

API Connector - API Connections screen
API Connector – API Connections screen

Click ‘Add New API Connection’ to add a new connection.

Default API Configuration

  • API Name:: Define an easily recognizable name for the API.
  • Slug: A permanent, unique identifier for the API. Once created, it cannot be changed.
  • Base URL: The API’s main endpoint. In the Form’s Feed settings you can define sub paths relative to this url.
  • Authentication method: Choose the method of authentication:
    • No authentication
    • API Key
    • Basic Authentication
    • Bearer Token

Authentication Fields

Depending on the selected authentication method, different fields may appear:

  • Basic Authentication:
    • Username: the API username.
    • Password: the API password or secret.
  • API Key:
    • API Key: Input field for entering the key.
    • API Key Parameter Name: Name for the API key (default: x-key).
    • API Key Placement: Select whether the API key goes in the header or is included as a GET parameter.
  • Bearer Token:
    • Bearer Token: Enter the bearer token.

Do you want to connect to an API that is not yet supported? Please reach out to our support.

API Connector1.0

For this functionality you need the GravityWP - API Connector Add-on installed.

Read more