Skip to main content
RapidDev - Software Development Agency
flutterflow-integrationsFlutterFlow API Call

ClickFunnels

Connect FlutterFlow to ClickFunnels 2.0 using FlutterFlow API Calls routed through a Firebase Cloud Function or Supabase Edge Function backend proxy that holds the OAuth-2 credentials and Bearer token. Your FlutterFlow app creates contacts, reads orders, and pushes leads from in-app forms into your ClickFunnels 2.0 workspace — confirm your account is ClickFunnels 2.0, not Classic 1.0, before building.

What you'll learn

  • How to confirm you are on ClickFunnels 2.0 (not Classic 1.0) and note your workspace URL
  • How to create a Platform Application in ClickFunnels 2.0 to obtain a client_id and client_secret
  • Why OAuth-2 client secrets and token refresh must live in a backend proxy, not in FlutterFlow
  • How to create a FlutterFlow API Call group targeting your backend proxy with workspace-scoped paths
  • How to wire a lead-capture form in FlutterFlow to the create-contact API Call
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate13 min read45 minutesMarketingLast updated July 2026RapidDev Engineering Team
TL;DR

Connect FlutterFlow to ClickFunnels 2.0 using FlutterFlow API Calls routed through a Firebase Cloud Function or Supabase Edge Function backend proxy that holds the OAuth-2 credentials and Bearer token. Your FlutterFlow app creates contacts, reads orders, and pushes leads from in-app forms into your ClickFunnels 2.0 workspace — confirm your account is ClickFunnels 2.0, not Classic 1.0, before building.

Quick facts about this guide
FactValue
ToolClickFunnels
CategoryMarketing
MethodFlutterFlow API Call
DifficultyIntermediate
Time required45 minutes
Last updatedJuly 2026

Push Leads and Read Orders from Your FlutterFlow App into ClickFunnels 2.0

ClickFunnels 2.0 (myclickfunnels.com) exposes a REST API at `https://accounts.myclickfunnels.com/api/v2` that lets you read and write contacts, orders, and products inside your workspace. For a FlutterFlow app, the most common use case is a lead-capture form: a user fills in their name and email in your mobile app, and a tap of the button pushes that contact straight into your ClickFunnels funnel — no manual CSV import needed. Secondary use cases include reading order data for a customer-facing order status screen or pulling product listings for an in-app shop page.

Before writing a single API Call in FlutterFlow, you must confirm your account type. ClickFunnels 2.0 (accessed at myclickfunnels.com) and Classic 1.0 have entirely different, incompatible APIs. Building against the wrong documentation wastes your entire setup. If you are unsure, log in and check the URL — ClickFunnels 2.0 accounts use `myclickfunnels.com`.

All ClickFunnels 2.0 API requests are workspace-scoped. Your workspace URL (a subdomain like `yourcompany.myclickfunnels.com`) must be included in every API request path. The backend proxy is the right place to bake this in, so your FlutterFlow API Calls stay clean. API access requires a paid ClickFunnels 2.0 plan — check current plan details at clickfunnels.com/pricing. Rate limits are not publicly documented; verify them in the ClickFunnels developer portal after creating a Platform Application. The client secret and refresh tokens must live server-side, because a compiled Flutter app binary exposes anything embedded in its code.

Integration method

FlutterFlow API Call

FlutterFlow API Calls target a backend proxy (Firebase Cloud Function or Supabase Edge Function) that holds ClickFunnels 2.0 OAuth-2 credentials and Bearer token. The proxy forwards authenticated requests to `https://accounts.myclickfunnels.com/api/v2`, prefixed with your workspace URL, so the FlutterFlow app never handles secrets directly. This lets you create leads from in-app forms and read contacts or orders in a dashboard.

Prerequisites

  • A ClickFunnels 2.0 account (myclickfunnels.com — confirm it is 2.0, not Classic 1.0)
  • A Platform Application created in the ClickFunnels 2.0 developer portal (for client_id and client_secret) or a Bearer token from your account settings
  • Your ClickFunnels workspace URL (subdomain, e.g., yourcompany.myclickfunnels.com)
  • A Firebase project (for Cloud Functions) or a Supabase project (for Edge Functions) already connected to FlutterFlow
  • A FlutterFlow project open in the browser with a form screen ready to wire up

Step-by-step guide

1

Confirm ClickFunnels 2.0 and obtain API credentials

Log into your ClickFunnels account. If the URL shows `myclickfunnels.com`, you are on ClickFunnels 2.0 — proceed. If you see `app.clickfunnels.com` or your own custom domain with the Classic interface, you are on Classic 1.0, and this guide does not apply — the APIs are incompatible. Note your workspace URL. It is the subdomain portion of your account URL, e.g., if your account is at `acme.myclickfunnels.com`, your workspace URL is `acme`. Every API request will be prefixed with this. To create API credentials, navigate to Settings in your ClickFunnels 2.0 workspace, then find the 'Developer Tools' or 'API' section and create a Platform Application. This gives you a client_id and client_secret. If ClickFunnels 2.0 also offers a personal Bearer token option (a simpler static token for private use), you can use that for a faster start — it avoids the full OAuth-2 flow but still must be kept server-side. For the OAuth-2 flow, you will exchange the client credentials for an access token via `POST /oauth/token` at `accounts.myclickfunnels.com`. The exact OAuth endpoints are documented in ClickFunnels 2.0's developer portal at `developers.myclickfunnels.com`. Copy the access token and refresh token into your backend environment variables — never into FlutterFlow.

Pro tip: If ClickFunnels 2.0 provides a personal access token option in addition to OAuth-2, use it for initial testing — you skip the authorization code flow and get a working token faster. Just remember it still goes in the backend, not in FlutterFlow.

Expected result: You have a ClickFunnels 2.0 workspace URL and either a Bearer token or OAuth-2 client credentials stored safely outside of FlutterFlow.

2

Deploy a backend proxy with workspace-scoped routes

Your backend proxy does two things: it holds the Bearer token (or runs OAuth-2 token refresh), and it prepends your workspace URL to every ClickFunnels API path so FlutterFlow API Calls stay simple. Create a Firebase Cloud Function (or Supabase Edge Function) with two HTTP-triggered endpoints: one for creating a contact and one for reading orders. In the function, set the ClickFunnels base URL as `https://accounts.myclickfunnels.com/api/v2/{workspaceUrl}` (replace `{workspaceUrl}` with your actual workspace subdomain, stored as an environment variable). Attach the `Authorization: Bearer YOUR_TOKEN` header server-side. For the create-contact endpoint, the function receives `{ name, email }` from FlutterFlow, then makes a `POST` to `/contacts` on the ClickFunnels API with the appropriate request body (check the ClickFunnels 2.0 API documentation for the exact field names, as contact schemas vary by workspace configuration). Return a success/failure response to FlutterFlow. For the read-orders endpoint, the function queries `GET /orders` with optional filter parameters and returns a clean array to FlutterFlow. If token refresh is needed, implement it in the function using the refresh token and update the stored access token before retrying the request.

index.js
1// Firebase Cloud Function — ClickFunnels 2.0 proxy (index.js)
2const functions = require('firebase-functions');
3const fetch = require('node-fetch');
4
5const CF_TOKEN = functions.config().clickfunnels.token;
6const CF_WORKSPACE = functions.config().clickfunnels.workspace; // e.g. 'acme'
7const CF_BASE = `https://accounts.myclickfunnels.com/api/v2/${CF_WORKSPACE}`;
8const authHeaders = {
9 'Authorization': `Bearer ${CF_TOKEN}`,
10 'Content-Type': 'application/json'
11};
12
13// Endpoint: create a contact/lead
14exports.createContact = functions.https.onRequest(async (req, res) => {
15 res.set('Access-Control-Allow-Origin', '*');
16 if (req.method === 'OPTIONS') return res.status(204).send('');
17
18 const { name, email } = req.body;
19 if (!email) return res.status(400).json({ error: 'email required' });
20
21 const r = await fetch(`${CF_BASE}/contacts`, {
22 method: 'POST',
23 headers: authHeaders,
24 body: JSON.stringify({ contact: { email, name } })
25 });
26 const data = await r.json();
27 res.status(r.status).json(data);
28});
29
30// Endpoint: list orders
31exports.getOrders = functions.https.onRequest(async (req, res) => {
32 res.set('Access-Control-Allow-Origin', '*');
33 if (req.method === 'OPTIONS') return res.status(204).send('');
34
35 const r = await fetch(`${CF_BASE}/orders?per_page=50`, { headers: authHeaders });
36 const data = await r.json();
37 res.json(data.orders || data);
38});
39

Pro tip: Store both `clickfunnels.token` and `clickfunnels.workspace` as Firebase Functions config values using `firebase functions:config:set clickfunnels.token=... clickfunnels.workspace=acme`. This keeps all workspace-specific values out of your source code.

Expected result: Two Cloud Function URLs are live: one accepts a POST with name/email and creates a ClickFunnels contact, one returns a list of orders. Both can be tested with a tool like Postman or cURL.

3

Create a FlutterFlow API Call group targeting your proxy

In your FlutterFlow project, click 'API Calls' in the left navigation bar. Click '+ Add' and select 'Create API Group'. Name it 'ClickFunnels' and set the base URL to the root of your Firebase Cloud Functions deployment (e.g., `https://us-central1-your-project.cloudfunctions.net`). No Authorization header is needed here — your backend proxy adds it. Click 'Save'. Add the first API Call within this group for lead capture. Click '+ Add API Call', name it 'Create Contact', set the method to POST, and set the endpoint to `/createContact`. Switch to the 'Variables' tab and add two variables: `contact_name` (String) and `contact_email` (String). Switch to the 'Body' tab, select JSON body type, and write the body as `{ "name": "{{contact_name}}", "email": "{{contact_email}}" }` — FlutterFlow will substitute the double-brace variable names at runtime. Switch to the 'Response & Test' tab, fill in test values, click 'Test', and confirm the Cloud Function returns a success response and a new contact appears in your ClickFunnels 2.0 workspace. Add a second API Call named 'Get Orders', set method to GET, endpoint to `/getOrders`. Test it and generate JSON paths from the returned order objects so you can bind fields to widgets later.

typescript
1// FlutterFlow API Call config reference
2{
3 "group_name": "ClickFunnels",
4 "base_url": "https://us-central1-YOUR_PROJECT.cloudfunctions.net",
5 "api_calls": [
6 {
7 "name": "Create Contact",
8 "method": "POST",
9 "endpoint": "/createContact",
10 "body_type": "JSON",
11 "body": { "name": "{{contact_name}}", "email": "{{contact_email}}" },
12 "variables": [
13 { "name": "contact_name", "type": "String" },
14 { "name": "contact_email", "type": "String" }
15 ]
16 },
17 {
18 "name": "Get Orders",
19 "method": "GET",
20 "endpoint": "/getOrders"
21 }
22 ]
23}
24

Pro tip: After pasting the JSON body template in FlutterFlow, click elsewhere and then back into the body field to confirm FlutterFlow has parsed the `{{variable}}` placeholders correctly. They should appear highlighted or as variable chips in the UI.

Expected result: Both API Calls test successfully in FlutterFlow — Create Contact creates a real contact in ClickFunnels 2.0, and Get Orders returns order data with JSON paths auto-generated.

4

Wire the lead-capture form to the Create Contact API Call

Navigate to the screen in your FlutterFlow project that has the lead-capture form. If you do not have one yet, add a Column containing two TextFields (one for name, one for email) and a Button. Name the TextFields' controllers clearly — FlutterFlow creates them automatically when you add a TextField; you will reference them in the action. Select the Submit/Join button and open its Actions panel by clicking the lightning bolt icon on the right. Click '+ Add Action'. Under 'Backend/Database', choose 'API Call'. Select the 'ClickFunnels' group and the 'Create Contact' API Call. For the `contact_name` variable, click the binding button and select 'Widget State → [your name TextField controller]'. For `contact_email`, bind it to the email TextField controller. After the API Call action, add a follow-up action: 'Show Snack Bar' with a message like 'You are on the list!' to confirm success to the user. To handle errors, add a conditional action that checks the API response status code — if it is not 200 or 201, show an error snack bar instead. Test the full flow in FlutterFlow's Run Mode (or on a real device): fill in the form, tap Submit, and verify the contact appears in your ClickFunnels 2.0 account under Contacts.

Pro tip: Add email format validation using FlutterFlow's built-in TextField validation (set 'Validator' to 'Email Address') before the API Call action fires. This prevents invalid emails from reaching ClickFunnels and avoids unnecessary API calls.

Expected result: Tapping the form's Submit button sends the name and email to your Cloud Function, which creates a real contact in ClickFunnels 2.0. The user sees a confirmation snack bar.

5

Add an orders dashboard screen (optional) and test end-to-end

If your use case includes reading order data, create a new screen in FlutterFlow and add a ListView. Configure its backend query: 'API Call → ClickFunnels → Get Orders'. Inside the ListView item, add Card widgets with Text widgets bound to the JSON paths you generated — for example, order ID, total price, status, and creation date. Bind each field to the corresponding JSON path (e.g., `$.id`, `$.total`, `$.state`, `$.created_at`). For the visual polish, add a status Chip or Container whose background color is set conditionally based on the order status field: green for 'paid' or 'fulfilled', orange for 'pending', red for 'refunded'. FlutterFlow's conditional visibility and conditional value features make this straightforward. Before publishing or sharing the app, run a full end-to-end test: submit a lead from the form screen, verify it in ClickFunnels 2.0, then view the orders screen and confirm it loads real data. Pay special attention to the 404 response if the workspace URL prefix is incorrect — if orders return 404, double-check that your Cloud Function is using the exact workspace subdomain that ClickFunnels 2.0 requires, not a guess.

Pro tip: If you are getting consistent 404s from the ClickFunnels API even with a seemingly correct URL, open the ClickFunnels 2.0 developer portal documentation and use the built-in API explorer to make a live test call — it will show you the exact URL structure your workspace requires.

Expected result: The orders screen displays real ClickFunnels 2.0 order data with status-coloured chips, and the lead-capture form flow works end-to-end on a real device or in Run Mode.

Common use cases

Lead-capture app that pushes contacts into a ClickFunnels funnel

A founder runs offline workshops and uses a FlutterFlow app on a tablet at the sign-in desk. Attendees type in their name and email, tap 'Join our list', and the app pushes a new contact into their ClickFunnels 2.0 workspace instantly — no CSV exports, no manual entry later.

FlutterFlow Prompt

Build a simple lead-capture form screen with name and email fields and a Submit button. When Submit is tapped, call our backend API to create a contact in ClickFunnels 2.0 and show a confirmation message.

Copy this prompt to try it in FlutterFlow

Order status dashboard for ClickFunnels customers

A DTC brand built their checkout in ClickFunnels 2.0 and wants a companion FlutterFlow app where customers can log in and view their order history. The app calls the backend proxy to read orders filtered by email address and displays status cards for each order.

FlutterFlow Prompt

Create an orders screen that lists the current user's ClickFunnels orders with order date, total, and fulfillment status, fetched from our backend proxy.

Copy this prompt to try it in FlutterFlow

In-app product catalogue linked to ClickFunnels products

A digital product seller manages all their products in ClickFunnels 2.0 and wants a mobile app that displays the same product catalogue. The FlutterFlow app reads the products endpoint, renders cards with titles and prices, and deep-links to the matching ClickFunnels checkout page in a WebView.

FlutterFlow Prompt

Show a grid of products pulled from our ClickFunnels 2.0 account. Each card shows the product name and price. Tapping a card opens the ClickFunnels checkout link in a WebView.

Copy this prompt to try it in FlutterFlow

Troubleshooting

API returns 404 Not Found for all ClickFunnels endpoints

Cause: The workspace URL prefix is missing or incorrect in the backend proxy's base URL. Every ClickFunnels 2.0 API path must include the workspace subdomain.

Solution: Open your Cloud Function and log the full URL being requested before making the fetch. Confirm it matches the pattern `https://accounts.myclickfunnels.com/api/v2/{workspaceSubdomain}/contacts`. The workspace subdomain is the part before `.myclickfunnels.com` in your account URL. Update `CF_WORKSPACE` in your function config and redeploy.

Classic 1.0 API returns errors — `apidocs.clickfunnels.com` docs do not match

Cause: The account is on ClickFunnels Classic 1.0, but the code targets the ClickFunnels 2.0 API at `accounts.myclickfunnels.com`.

Solution: Confirm the account type by logging into ClickFunnels and checking the URL. Classic 1.0 and 2.0 have different base URLs and different endpoint schemas — they are not interchangeable. If you are on Classic 1.0, you will need to use Classic's legacy API (documented at `apidocs.clickfunnels.com`) with its own auth model instead.

401 Unauthorized after working for a while — token suddenly invalid

Cause: ClickFunnels OAuth-2 access tokens expire. Without a refresh-token rotation in the backend, the token goes stale.

Solution: Implement refresh-token logic in your Cloud Function: when a 401 is received, use the stored refresh token to call `POST /oauth/token` with `grant_type=refresh_token`, store the new access token, and retry the original request. Add error alerting so you know when a token refresh fails in production.

FlutterFlow shows 'XMLHttpRequest error' when testing API Calls in web Test Mode

Cause: The Cloud Function is missing CORS headers, so the browser blocks the response in FlutterFlow's web preview.

Solution: Ensure every response in your Cloud Function includes `res.set('Access-Control-Allow-Origin', '*')` and that OPTIONS preflight requests are handled with a 204 response. Redeploy the function and reload FlutterFlow. Native iOS/Android builds do not have this restriction.

Best practices

  • Confirm your ClickFunnels account is on version 2.0 (myclickfunnels.com) before writing any API Calls — the Classic 1.0 and 2.0 APIs are incompatible.
  • Store the workspace subdomain URL as a backend environment variable, not hardcoded in your Cloud Function source code, so you can move between workspaces without a redeploy.
  • Implement refresh-token rotation in your backend proxy from the start — ClickFunnels OAuth-2 tokens expire and silent failures are hard to debug in production.
  • Never place the client_secret or Bearer token in a FlutterFlow API Call header — it ships in the compiled app binary and can be extracted.
  • Validate email addresses in FlutterFlow's TextField before triggering the Create Contact API Call to avoid unnecessary backend calls and ClickFunnels validation errors.
  • Add FlutterFlow loading indicators (CircularProgressIndicator) on form submit buttons and list screens — API latency through a proxy chain is higher than a direct call.
  • Handle the API response status code in your FlutterFlow action flow — show different snack bar messages for 201 Created (success), 422 Unprocessable Entity (validation error), and 5xx (server error).

Alternatives

Frequently asked questions

Does this integration work with ClickFunnels Classic (1.0)?

No. ClickFunnels Classic 1.0 and ClickFunnels 2.0 have entirely different, incompatible APIs with different base URLs and auth models. This guide covers ClickFunnels 2.0 only (myclickfunnels.com). If you are on Classic, you would need to build against the Classic API documented at apidocs.clickfunnels.com with its own setup process.

Can I put the ClickFunnels Bearer token directly in a FlutterFlow API Call header?

You should not. Any value placed in a FlutterFlow API Call header is compiled into the app binary and can be extracted from the installed app. A ClickFunnels Bearer token gives write access to contacts and orders in your workspace. Always route through a Firebase Cloud Function or Supabase Edge Function that holds the token server-side.

What ClickFunnels plan do I need to use the API?

API access is available on ClickFunnels 2.0 paid plans. The entry plan starts at approximately $97/month, but check the current pricing and plan tiers at clickfunnels.com/pricing as these can change. Rate limits are not publicly documented — verify them in the ClickFunnels developer portal after creating a Platform Application.

Can FlutterFlow receive ClickFunnels webhooks for real-time order or purchase events?

FlutterFlow itself cannot receive webhooks — it is a client-side app. Your Firebase Cloud Function or Supabase Edge Function can receive ClickFunnels webhooks, write the event data to Firestore or a Supabase table, and then FlutterFlow reads that data in real time via its native Firestore or Supabase integrations.

How do I pass the workspace URL to the ClickFunnels API without hardcoding it?

Store the workspace subdomain in your backend environment variables (Firebase Functions config or Supabase secrets) and build the full URL server-side in the Cloud Function. This way, if you ever switch workspaces or want to support multiple clients, you update the environment variable and redeploy — no changes to your FlutterFlow project needed.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire FlutterFlow integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.