Skip to content

Meta ​

The Meta integration connects oneCRM to your business on Meta, so modules such as WhatsApp can send and receive messages for it. You set it up once: a Meta app of your own, and a system user of your business whose token oneCRM uses. Every channel built on Meta shares this one setup.

Configure Meta in Settings → Integrations → Meta. Only super admins can see this setting.

NOTE

What you need

  • A Meta business portfolio that you administer.
  • The accounts your channels use, such as your WhatsApp account, in that portfolio.
  • oneCRM on a public HTTPS address, so Meta can send it messages.
  • A privacy policy page on your website. Meta asks for it before it publishes your app.

Meta may ask for your Facebook password while you set it up, for example to show the app secret or to generate the token.

Create a Meta app ​

  1. Sign in to Meta for Developers and click Create app.

  2. Enter an App name, for example CRM Inbox, and the App contact email address, then click Next.

    Create an app: App details

  3. Under Add use cases, filter by Business messaging and select the use case of each channel you set up, for example Connect with customers through WhatsApp. One app can hold the WhatsApp, Messenger and Instagram use cases together. Click Next.

    Create an app: Use cases, with Connect with customers through WhatsApp selected

  4. Select the business portfolio that holds your WhatsApp account and click Next. Your system user can only be given apps of its own business, and an app can't easily move to another portfolio later.

    Create an app: Business, with the business portfolio selected

  5. Continue through Requirements and Overview to create the app. Meta opens its dashboard.

Copy the app ID and secret ​

  1. In the app's menu, open App settings → Basic.

    The app menu with App settings → Basic

  2. Copy the App ID. Click Show next to App secret and copy the secret too.

    App ID and App secret in App settings → Basic

  3. On the same page, enter the address of your privacy policy as the Privacy policy URL and click Save changes at the bottom. You need it to publish the app.

    The Privacy policy URL field

Create a system user ​

A system user belongs to your business rather than to a person, and its token does not expire, so the channels keep working when staff change.

  1. Open Business Settings and go to Users → System users.

    Business Settings with Users → System users

  2. Click Add, enter a System user name such as CRM Inbox, choose the Employee role and click Create system user.

    Create system user with the Employee role

  3. On the system user's page, click Assign assets.

    A new system user with no assets yet

  4. Choose Apps, select your app, turn on Manage app under Full access and click Assign assets.

    Assigning the app with Manage app

  5. Click Assign assets again for the accounts of your channels. For WhatsApp, choose Messaging accounts → Linked accounts, select your WhatsApp account, turn on Everything under Full access and click Assign assets. Assigning it only under WhatsApp accounts doesn't give the token its numbers.

    Assigning the WhatsApp account under Messaging accounts with Everything

The system user's Assigned assets now list the app and the account with Full access.

The system user's assigned assets

Generate the token ​

  1. On the system user's page, click Generate token.

  2. Under Select app, choose your app and click Next.

    Generate token: Select app

  3. Under Token expiry, choose Never and click Next.

    Generate token: Token expiry set to Never

  4. Under Select permissions, select the permissions listed under Permissions the system user token needs in Settings → Integrations → Meta. For WhatsApp these are whatsapp_business_management and whatsapp_business_messaging. Click Generate token.

    Generate token: the two WhatsApp permissions selected

  5. Click Copy to copy the token. Meta shows it only once.

    Token created, with its Copy button

Add the app and token in oneCRM ​

  1. Open Settings and click Meta under Integrations.

    Meta under Integrations in Settings

  2. Paste the App ID and App secret, and click Save settings.

    The Meta integration with the App ID and App secret

  3. Click Connect account, paste the token as the System user access token, and click Connect.

    Connect Meta account with the System user access token

The account shows under Connected accounts, named after the system user, and Meta shows as Configured.

The connected system user under Connected accounts

When you assign more accounts to the system user later and a channel doesn't list them, generate the token again and enter it with Update credentials.

Publish the app ​

A new app is unpublished. While it is, Meta sends your app only the test webhooks of its dashboard, not the messages your customers send. Publish it once your channel's webhook is set up, for example as the WhatsApp module's Connect a number describes.

  1. In the app's menu, click Publish. Meta checks the app's required settings. If it lists Privacy Policy URL, add one as in Copy the app ID and secret.

    Publish, asking for a Privacy Policy URL

  2. When it shows All required app settings are complete, click Publish at the bottom right.

    Publish with all required app settings complete

  3. Meta confirms that the app was published, and Publish in the menu no longer shows Unpublished.

    Your app was successfully published

Your business uses the app only for its own accounts, so WhatsApp needs no App Review for it.

Change the app secret ​

Each webhook you set up at Meta takes a verify token. oneCRM makes it from the app secret, so after you reset the app secret and save the new one, the verify token shown in oneCRM changes too. Meta only checks it when a webhook is set up or edited, so messages keep arriving, but enter the new verify token the next time you edit a webhook in the app dashboard.

Troubleshooting ​

MessageCauseFix
Meta rejects the account's credentialsThe token was revoked, the system user was deleted, or the token was pasted incompletely.Generate a new token for the system user and enter it with Update credentials under Connected accounts in Settings → Integrations → Meta.
Connect account is missingThe app is not saved yet.Enter the App ID and App secret and click Save settings.
A channel doesn't list your accounts, such as a WhatsApp numberThe account is not assigned to the system user, or the token lacks a permission.Assign the account to the system user as in Create a system user. For a missing permission, generate the token again with every permission oneCRM lists, and update the credentials.
A permission is missing from Select permissionsThe app doesn't have the channel's use case.Add the use case under Use cases → Add use cases in the app, then generate the token again.
Customers' messages don't arrive, but the dashboard's test webhooks doThe app is not published.Publish the app.
Requests fail with Invalid appsecret_proofThe App secret in oneCRM is not the app's current secret.Copy the secret from App settings → Basic again and save it.

Giải pháp CRM Tinh gọn Tự lưu trữ - Sở hữu toàn quyền, không phụ phí định kỳ.