Connect with your own Meta app
Messenger, Instagram and WhatsApp can run through your Meta app instead of Hania's. You create the app, generate a token, and paste it into Hania along with your app secret; Hania hands back a callback URL and a verify token that you enter in your app's webhook settings. It takes about fifteen minutes and needs no App Review.
When to use this
There are two ways to connect a Meta channel, and both are live:
- Quick connect with Facebook. You click Continue with Facebook, authorize in the popup, and Hania sets everything up from what Facebook hands back. Nothing to create, copy, or maintain. This is the right choice for most people, and it's covered in Messaging channels.
- Your own Meta app. You own the app, the token and the webhook. Worth doing if your organisation wants messaging to run under its own Meta app for policy or auditing reasons, if you already have an app wired up for other Meta work, or if the Facebook window won't complete for your account.
The rest of this page is the own-app path, start to finish. The console shows an abbreviated version of the same steps: open Channels → Connect a channel, pick a Meta platform, choose Connect with your own Meta app instead, and expand Setup guide.
1. Create the app
- Go to developers.facebook.com/apps and create a new app. Choose the Business app type; the other types don't offer the messaging products.
- Add the product you need to the app: Messenger, Instagram, or WhatsApp. You can add more than one to the same app if you plan to connect several channels.
2. Switch the app Live
A new app starts in development mode, where it only works for people who have a role on it. Real customers messaging your Page would be ignored, so the app has to go Live before the channel is useful.
- Open Settings → Basic and fill in the fields Meta requires before an app can go Live: a privacy policy URL, an app icon, and a category.
- Flip the app-mode toggle at the top of the dashboard from Development to Live. No App Review is needed for this; see why below.
- While you're on Settings → Basic, copy the App secret. You'll paste it into Hania in step 5. Treat it like a password.
Meta's reference for the two modes: App modes.
3. Generate the token
Messenger and Instagram
Both use a long-lived Page access token for the Facebook Page involved. For Instagram that's the Page your professional account is linked to, so link them first if you haven't. Meta's walkthrough is Getting a long-lived access token, and the Graph API Explorer is the easiest place to generate the first one.
You'll also need the ids the channel is keyed on. In the Graph API Explorer, GET /me/accounts lists each Page with its id, and for Instagram GET /{page-id}?fields=instagram_business_account returns the Instagram account id.
WhatsApp uses a System User token rather than a Page token. Create one in Business settings → System users: add a system user with the Admin role, use Add Assets to assign both your app and your WhatsApp Business Account, then Generate new token granting whatsapp_business_messaging, whatsapp_business_management and business_management. Copy it when it appears, as it's shown once.
The Phone Number ID and WhatsApp Business Account ID both appear under WhatsApp → API Setup in the app dashboard. The Phone Number ID is a long number beside your business number, not the phone number itself.
4. WhatsApp only: check the number is registered
A WhatsApp business number has to be registered with its six-digit PIN before it can send or receive through the Cloud API. This normally happens when you add the number, so it's usually already done; if messages are rejected later, this is the first thing to check. Meta's reference: Registration.
5. Connect in Hania
- Open Channels in the console and choose Connect a channel.
- Pick Messenger, Instagram or WhatsApp, then choose the agent that should answer messages here.
- Click Connect with your own Meta app instead.
- Fill in the platform ids, the token from step 3, and the App secret from step 2. A display name is optional; leave it blank and the channel is labelled with the account's own name.
- Click Connect. Hania validates the token and ids against Meta before saving, so a wrong id or a missing permission fails here with Meta's own error message rather than silently later.
On success Hania shows a callback URL and a verify token. Use them together as a pair; both go into your Meta app in the next step.
6. Point your app's webhook at Hania
Back in your app dashboard, open the product you added in step 1 and find its webhook configuration (for Messenger and WhatsApp that's Configuration → Webhook; for Instagram it's under the Instagram product's settings). Enter the callback URL and verify token Hania gave you, save, then subscribe to the fields for that product:
| Product | Webhook object | Subscribe to these fields |
|---|---|---|
| Messenger | page | messages, messaging_postbacks, and calls if the agent takes voice calls |
instagram | messages | |
whatsapp_business_account | messages, and calls if the agent takes voice calls |
Once the webhook is verified and the fields are subscribed, message the Page, account or number yourself. The conversation appears in the console under Conversations, tagged with that platform's channel.
If the agent should take voice calls
Messenger and WhatsApp channels can answer inbound voice calls as well as messages. That needs three things, on top of subscribing the calls field above:
- The assigned agent has to be voice-enabled, or there's nothing to answer the call.
- WhatsApp only: calling has to be switched on for the number itself. With your own token, call
POST /{phone_number_id}/settingswith the body{"calling":{"status":"ENABLED","call_icon_visibility":"DEFAULT"}}. - For Messenger calling, the
callsfield on thepageobject has to be subscribed, same as the messaging fields.
whatsapp_business_manage_events). Messaging on your own app is well-trodden; calling on your own app is newer ground. If you're planning voice on an own-app WhatsApp channel, test it early rather than close to a launch.
Connecting more than one account from the same app
Every connect returns its own callback URL, so three connected accounts give you three different URLs. You only ever configure one of them in your Meta app: any one delivers for all accounts connected from that app, because they share the app secret and Hania routes each incoming event to the right channel. So after the first channel is working, connect the others and leave your webhook settings exactly as they are.
The one thing to be careful about is mixing pairs. The callback URL and verify token you paste into Meta have to come from the same connect response, because the handshake validates against that account's token.
Removing one of those channels is safe: messages arriving on its URL are routed on to the app's other connected accounts, so nothing else stops working. The one thing that does need a live account is a fresh handshake, which happens when you re-save the webhook settings in your Meta dashboard. So if you're choosing which account's callback URL to configure, prefer one you don't expect to remove.
Why there's no App Review
App Review is what Meta requires before an app can touch assets belonging to other businesses. Reaching your own Pages, Instagram accounts and WhatsApp numbers is Standard Access, which every app has from the moment it's created. Since your app only ever talks to your own assets here, there's nothing to submit and nothing to wait for; making the app Live in step 2 is enough.
Meta's references, if you want to confirm this for your own compliance notes:
- Access levels - Standard versus Advanced Access
- Messenger Platform overview
- Instagram Platform app review
- WhatsApp permissions
Troubleshooting
- Saving the webhook fails with a 403 - the channel doesn't exist in Hania yet, so nothing answered Meta's verification request. Connect in Hania first, then save the webhook.
- "The verification token does not match" - the verify token was mistyped, or it belongs to a different connect than the callback URL beside it. The two have to come from the same connect response. Both values are in the channel's Edit view if you need to check them.
- Re-saving webhook settings fails after removing a channel - a fresh handshake needs the configured callback URL to belong to a connected account. Point your Meta app at a still-connected account's URL, from its Edit view, and save again. Message delivery itself keeps working either way.
- A channel shows a Delivery error badge - hover it for the reason Meta gave. The usual cause on an own-app channel is a reset app secret, which makes inbound messages fail their signature check; reconnect with the new secret. See resetting your app secret.
- Connect fails with "Could not connect account (subscription failed - check the token and ids)" - Hania asked Meta to subscribe the account's webhooks and Meta refused. Usually a wrong Page ID or Phone Number ID, or a token missing a permission. Meta's own message follows the colon and names the problem.
- "token is required" - an app secret was entered without a token. This path needs both; the app secret identifies your app, the token grants access to the account.
- The channel connects but no messages arrive - the webhook fields weren't subscribed, or the app is still in Development mode. Check both, and remember a dev-mode app only responds to people with a role on it.
- It worked for a few hours, then went quiet - the token was a short-lived one. Generate a long-lived Page token, or a System User token for WhatsApp, and reconnect the channel.
- Instagram messages don't arrive - the professional account isn't linked to the Facebook Page whose token you used, or the
instagramobject'smessagesfield isn't subscribed.
After it's connected
An own-app channel is marked Own app in the Channels list and behaves like any other channel from there on. Its Edit view shows the callback URL and verify token again whenever you need them, and the list shows a Delivery error badge if inbound messages start being rejected, with the reason on hover.
Renaming the channel or reassigning it to a different agent needs no reconnect and no change on Meta's side: the route, the credentials and the webhook wiring all stay as they are, and the new agent picks up the next incoming message. The platform, the ids, the token and the app secret are fixed, so changing any of those means removing the channel and connecting it again.
If you reset your app secret
Meta lets you reset an app secret, and doing so invalidates the copy Hania holds. Inbound messages then fail their signature check and are rejected. There's no way to update the secret in place, so remove the channel and connect it again with the new one. The callback URL and verify token are unchanged, so your Meta app needs no edit.
You'll see this in the console rather than having to guess at it: the channel picks up a Delivery error badge in the Channels list, and hovering it shows what Meta reported. The badge clears itself once messages are getting through again.