How to use a custom client ID for authentication


With some CRMs, WP Fusion is registered as an app via those platforms’ developer programs. Because of this, you need an account on our site and a WP Fusion license to complete the initial authentication process with your CRM.

This applies to:

  • BirdSend
  • Drift
  • HubSpot
  • NationBuilder
  • Salesforce (coming soon)
  • Zoho

There may be scenarios where you want to use your own client ID for authentication, and not the WP Fusion client ID. For example if you have a created a custom branded app via your CRM’s developer program, or if you don’t have a WP Fusion license.

Using a custom client ID and authorization URL

The client ID and client secret are public properties on each CRM’s integration class. You can override them by hooking into the wp_fusion_init_crm action. For example with Zoho:

function set_custom_zoho_app() {

	wp_fusion()->crm->client_id        = '1000.XXXXXXXXXXXXXXXXXXXXX';
	wp_fusion()->crm->client_secret_us = '08dccXXXXXXXXXXXXXXXXXXXXX';


add_action( 'wp_fusion_init_crm', 'set_custom_zoho_app' );

To override the initial authorization request URI for the “Authorize” button in the WP Fusion settings, use the wpf_{$crm}_auth_url filter, for example with Zoho:

function set_custom_zoho_auth_url() {

	return ",ZohoCRM.settings.ALL,ZohoCRM.users.READ, &response_type=code&access_type=offline&";


add_action( 'wpf_zoho_auth_url', 'set_custom_zoho_auth_url' );

Note that in this example you must have registered as the redirect URI for your app, and must have a script running at that location which is capable of listening for the authorization response and redirecting back to the WP Fusion settings page with the &code= parameter in the URL.

Was this helpful?