DEV Community

Rahul Sharma
Rahul Sharma

Posted on

CF7 to Intercom Not Creating Contacts - Four Causes Explained

Intercom is one of the more technically demanding integrations to get right from CF7. The platform has gone through several API authentication changes, deprecated an entire object type (Leads), and has a permission scope system that causes silent failures even with valid tokens.

Here are the four causes that produce the same symptom - form submits, nothing appears in Intercom.

Cause 1: App ID + API Key Authentication Is No Longer Supported

Intercom's older API accepted Basic authentication using an App ID and API Key combination:

Authorization: Basic base64(APP_ID:API_KEY)
Enter fullscreen mode Exit fullscreen mode

A GitHub issue on the intercom-php library documented this exactly: a developer was getting 401 errors using new IntercomClient(APP_ID, API_KEY) even with valid credentials. The fix was switching to the Personal Access Token approach:

Authorization: Bearer YOUR_ACCESS_TOKEN
Enter fullscreen mode Exit fullscreen mode

The App ID + API Key pattern has been deprecated. Modern Intercom API calls require a Personal Access Token or an OAuth App token, both sent as Bearer tokens. If your CF7 to Intercom plugin was built several years ago and uses Basic auth with an App ID and API Key, it will return 401 on every call regardless of whether the credentials are valid.

Generate an Access Token: In Intercom, go to Settings, then Integrations, then Developer Hub. Create a new app or open an existing one. Under Authentication, generate an Access Token. Use this as the Bearer token in every API call.

Cause 2: Token Does Not Have the Required Permission Scopes

Intercom's Access Tokens have granular permission scopes. An Intercom community thread confirmed this directly: "If you try to use an access token that doesn't have the right permissions to query a specific API endpoint, a token_unauthorized error will be returned."

For creating contacts from a CF7 form, your token needs at minimum:

  • contacts:write — to create and update contact records
  • contacts:read — to search for existing contacts before creating duplicates

If your token was created with read-only scopes or limited permissions, the API call authenticates successfully but returns token_unauthorized when attempting to write a contact. This looks identical to an invalid token error from the WordPress side.

Check your token's scopes: In the Intercom Developer Hub, open your app, go to Authentication, and review the permissions assigned to your access token. If contacts:write is not included, edit the token permissions to add it.

Cause 3: Intercom Removed the Leads API — Contacts Only Now

This is the cause that breaks older integrations without any obvious error.

Intercom previously had two separate object types for people: Leads (anonymous visitors) and Users (identified contacts). Many early CF7 to Intercom integration plugins were built against the Leads API endpoint:

POST https://api.intercom.io/leads
Enter fullscreen mode Exit fullscreen mode

Intercom merged Leads and Users into a single Contacts object in 2018-2019 and deprecated the Leads endpoint. The current endpoint for all contact creation is:

POST https://api.intercom.io/contacts
Enter fullscreen mode Exit fullscreen mode

A plugin that is still calling the old /leads endpoint will get a 404 or a deprecated endpoint error. The contact is never created. The plugin may log nothing useful because it does not know how to handle the deprecated endpoint response.

Check your plugin: If your CF7 to Intercom plugin was last updated before 2020, it is almost certainly using the old Leads API. Update the plugin or switch to a direct integration using the current Contacts endpoint.

Cause 4: Creating an Archived Contact Returns an Error

An Intercom community thread documented a specific failure when a contact's email already exists in Intercom but the contact was archived: the create endpoint returns an error saying "An archived contact with this email address already exists" rather than creating a new contact or updating the existing one.

This happens when:

  • A contact previously submitted your form and was archived in Intercom
  • The same person submits again
  • The plugin tries to create a new contact
  • Intercom returns an error because the archived contact blocks creation

The correct handling is to first search for the contact by email, unarchive if found as archived, then update rather than create. Most simple CF7 to Intercom integrations do not handle this edge case.

Workaround: Use Intercom's upsert-style endpoint which handles this automatically, or search before creating.

The Correct CF7 to Intercom Integration

Intercom's current API for creating a contact:

POST https://api.intercom.io/contacts
Authorization: Bearer YOUR_ACCESS_TOKEN
Intercom-Version: 2.11
Content-Type: application/json

{
  "role": "lead",
  "email": "jane@example.com",
  "name": "Jane Smith",
  "phone": "+11234567890",
  "custom_attributes": {
    "message": "Their enquiry message here"
  }
}
Enter fullscreen mode Exit fullscreen mode

The role field accepts "lead" (anonymous, no login) or "user" (identified, has logged in to your product). For CF7 contact forms, "lead" is almost always correct.

The Intercom-Version header is required. Use the current version (2.11 at the time of writing) to ensure predictable API behaviour.

Contact Form to API handles this call from the WordPress dashboard. You set the Intercom contacts endpoint, add your Bearer token, include the Intercom-Version header, and map your CF7 fields to the contact payload. Every submission logs the Intercom response, so you see whether the contact was created or what error was returned.

Quick Diagnosis

Error Cause Fix
401 token_not_found Using App ID + API Key instead of Bearer token Generate Access Token, use as Bearer
401 token_unauthorized Token missing contacts:write scope Add write permission in Developer Hub
404 on the endpoint Plugin calling deprecated /leads endpoint Update plugin to use /contacts
"archived contact exists" error Email matches an archived Intercom contact Search first, unarchive, then update
403 from AWS WAF Server IP blocked by Intercom's WAF Contact Intercom support with request IDs

Top comments (0)