Early access

Your own Meta app

Instagram and Messenger connect through a Meta app that you own. Its name is what people see on the Facebook screen, its webhooks bring your messages in, and Meta reviews it, not us. This page sets one up from scratch.

Set aside an hour the first time. Most of it is clicking through Meta's developer console. You only do it once: every Page and Instagram account you connect afterwards uses the same app.

Which part you need

Your app can carry two sets of credentials. Save the ones for the way you connect:

You wantCredentialsWhere people sign in
Messenger, or Instagram through its linked Facebook PageApp ID, App Secret, Facebook Login for Business configuration IDFacebook, on a page at api.dmwire.ai
Instagram on its own, with a token your app already hasInstagram app ID and Instagram app secretYour own login flow (DMWire never sees it)

You can save both. A save always describes the whole setting, so send both sets every time you change one, or the other is removed.

1. Create the app

  1. Go to developers.facebook.com, open My Apps and create an app. Pick the Business type (or the use cases for Messenger, Instagram and Facebook Login for Business), and connect it to your business portfolio.
  2. Give it the name people should see on the Facebook screen. That is your brand, not ours.
  3. Under App settings, Basic, fill in a privacy policy URL, a category and an app icon. Meta needs them before the app can go live.
  4. Copy the App ID and the App Secret from the same screen.

2. Add the products

Add these products to the app:

  • Messenger, for Page messages.
  • Instagram, for Instagram direct messages. For the Page route choose the API setup with Facebook login; for the token route choose the API setup with Instagram login.
  • Facebook Login for Business, for the Page route.

3. Create the login configuration (Page route)

  1. Open Facebook Login for Business, Configurations and create a configuration.
  2. Choose the User access token type and include these permissions: pages_show_list, pages_messaging, pages_manage_metadata, pages_read_engagement, instagram_basic and instagram_manage_messages. Include Pages as an asset, so the person connecting can grant their Page.
  3. Copy the configuration ID. It belongs to this app only; another app's ID does not work.

DMWire checks the granted permissions right after the login. A login that grants no Page fails with the reason no_pages; one that misses a permission fails and names it.

4. Save the app on DMWire

Ask your agent to "save my Meta app" with the values, or call set_meta_app:

bash
curl -X PUT https://api.dmwire.ai/v1/account-config/meta-app \
  -H "X-API-Key: $DMWIRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"app_id":"...","app_secret":"...","config_id":"...","instagram_app_id":"...","instagram_app_secret":"..."}'

Leave out the Instagram pair if you only use the Page route, or the first three if you only push Instagram tokens. The App ID and App Secret are checked with Meta before anything is stored. Secrets are stored encrypted and never returned. In the dashboard at app.dmwire.ai, the Instagram and Messenger connect screens have the same form.

The answer carries the values for the next step: oauth_redirect_uri, webhook_urls and verify_token. Read them again any time with get_meta_app. The verify token is made on the first save and stays the same afterwards.

5. Paste the values into your app

In your Meta appPaste
Facebook Login for Business, Settings, Valid OAuth Redirect URIsoauth_redirect_uri, which is https://api.dmwire.ai/v1/auth-meta-callback-handler
Messenger, Webhooks, Callback URLwebhook_urls.messenger, then subscribe to messages, message_deliveries and message_reads
Instagram (Facebook login), Webhooks, Callback URLwebhook_urls.instagram, then subscribe to messages
Instagram (Instagram login), Webhooks, Callback URLwebhook_urls.instagram_login, then subscribe to messages
Verify token, on every callback aboveverify_token

Meta calls the callback URL with the verify token when you save it, so save the app on DMWire first. The callback URLs carry your account, so never share them between accounts.

6. Test with your own accounts

While the app is in development mode, only people with a role on the app (admins, developers, testers) can connect, and only their Pages and Instagram accounts send messages through it. Connect your own Page first: see Messenger and Instagram.

7. App Review, before anyone else connects

Before Pages and accounts outside your app's roles can connect, Meta has to grant Advanced Access to the permissions above (and to instagram_business_basic and instagram_business_manage_messages for the Instagram login route). You request it under App Review with a screen recording of the flow and a short explanation of how your app uses each permission. Meta also asks for Business Verification of your business portfolio. Review usually takes a few days; Meta decides, not DMWire.

The Messenger human agent tag (replies up to 7 days after the last message) needs its own permission. DMWire does not use it yet, so Messenger follows the 24 hour window.

Remove the app

remove_meta_app (or DELETE /v1/account-config/meta-app) deletes the saved app. Connections that already exist keep working until you disconnect them; new connections need an app saved again.

Meta's rules apply to your app

Your app, your Pages and your Instagram accounts are bound by Meta's platform terms and messaging policies, including the rules for automated replies and AI. Tell people they are talking to an automated assistant where Meta requires it, and hand the chat to a person when they ask for one.

Last checked against the live service on 2026-10-17.