Add-on: API Connector
API Connector is a Gravity Forms add-on that sends GET or POST requests to an external API with values from your form, and fills form fields with the response. Requests run live while the visitor fills in the form, or on submission. Use it to look up data such as addresses, product details or CRM records without custom code.
What you can do with API Connector
- Add reusable API connections under Forms → Settings → API Connector, each with a base URL and authentication.
- Authenticate with an API Key, Basic Authentication, a Bearer Token, OAuth 2.0 Client Credentials or OAuth 2.0 Authorization Code (with optional PKCE).
- Send form values in request headers, the query string or the body, including a JSON body for POST requests.
- Map values from the JSON response to fields with a path such as
0/weight/imperial. - Let visitors pick from several API results, show a message when the API fails, and store the request status in a hidden field for conditional logic.
- Run requests as a Gravity Flow workflow step.
Where to start
- Adding API connections: connect the API once.
- API Connector Feed settings: choose the request, the trigger and the field mapping for a form.
The JSON path tool lists the paths in a response, and each authentication method has its own page below.
Requirements
- Gravity Forms 2.5 or later
- WordPress 5.0 or later
- PHP 7.0 or later
- Optional: Gravity Flow, to run API requests as workflow steps
Features, pricing and a live demo are on the API Connector product page.
Adding API connections
In the GravityWP API Connector main settings page you can configure the connection settings. It is possible to add multiple APIs, manage authentication methods, and set custom headers for requests.
API Connector Feed settings
The Feed Settings allow you to configure how data is sent and received from external APIs using the GravityWP API Connector.
API Key Authentication in GravityWP API Connector
API Key authentication in GravityWP API Connector lets you store an API key once, choose whether it’s sent in a request header or as a query parameter, and reuse that connection across your API feeds. You set the exact parameter name required by the provider (such as x-api-key), then API Connector applies the key automatically whenever a feed runs.
Basic Authentication in GravityWP API Connector
Basic Authentication in GravityWP API Connector lets you authenticate API requests using a username and password stored in a reusable API connection. Once saved, you can select that connection in any API feed and run authenticated requests without re-entering credentials each time. For security, Basic Auth should be used over HTTPS because the credentials are only Base64-encoded, not encrypted.
Bearer Token Authentication in GravityWP API Connector
Bearer Token authentication in GravityWP API Connector lets you securely authenticate API requests by pasting an access token, without setting up an OAuth flow. Once saved as a connection, API feeds automatically send the token in the Authorization header (Bearer scheme) when running GET or POST requests.
OAuth 2.0 Authorization Code in GravityWP API Connector
OAuth 2.0 Authorization Code lets GravityWP API Connector connect to APIs using a browser-based consent flow instead of storing a long-lived token in your site. You register a redirect (callback) URL in your provider app, authorize access, and then API Connector can run requests securely through your feeds.
OAuth 2.0 Client Credentials in GravityWP API Connector
OAuth 2.0 Client Credentials lets GravityWP API Connector authenticate server-to-server by exchanging a Client ID and Client Secret for an access token using a Token URL. It runs without a browser consent screen or redirect URL, making it ideal for machine-to-machine integrations where feeds need to request a token automatically during execution.
Tool: Parse the possible paths from a JSON API response
This tool allows you to parse JSON-formatted API responses and visualize all available data paths for use in the API connector feeds Target Field mapping.