- Meta setup: create a business app, connect the Page, and collect the Page ID, Page Access Token, and App Secret.
- Artemis channel configuration using those values plus a Verify Token you invent, then copy the generated webhook URL.
- Webhook configuration in Meta: register the callback URL, complete Meta’s challenge, and subscribe the Page to the message events.
- Every value must come from one app and one Page: The Page ID, Page Access Token, App Secret, Verify Token, and webhook subscription all have to belong to the same Meta app and Page setup. Mixing values from two apps produces failures that look unrelated to each other.
- One Page routes to one connection: Reusing a Page means deactivating the existing connection first, or the second one has nothing to route to.
- Verification and subscription are separate steps: Meta verifies the callback URL whether or not you subscribe to anything, so a verified webhook with no subscription looks correct on screen and delivers nothing.
- Development mode blocks the public: Until Meta approves the app and you switch it to Live, Page tokens reach only accounts holding an app or Page role. A successful test with a role-holding account proves nothing about public access.
Prerequisites
- A Meta developer account, and a Facebook Page that customers will message.
- Enough access on the Page to perform the messaging and moderate tasks. Meta requires this of whoever generates the Page Access Token, so an editor or viewer role fails even when the app side looks correct.
- An HTTPS-reachable Artemis runtime, since Meta calls the callback URL during verification.
- Artemis project access with permission to open Deployments -> Channels, and a deployed agent in the environment you intend to bind.
How Artemis routes Messenger events
Meta sends every Page event to one generic URL, so Artemis identifies the connection from the payload rather than the path. It reads the Page ID out of the signed event and matches it to a connection.Meta setup
Complete all of this in Meta before you open Artemis. Meta covers the same ground in its Messenger Platform quick start.1
Create or open a business app
- Sign in to Meta for Developers and open My Apps.
- Create an app, or open the one that will own this connection.
- When Meta asks what the app does, choose the business messaging use case, or choose Other and then Business as the app type if Meta shows you that older flow.
2
Add the Messenger product
- On the App Dashboard, find Messenger in the products list.
- Select Set up. The left menu then carries a Messenger section holding the settings screen you’ll return to several times.
3
Connect the Facebook Page
- In the token generation area, add or select the Page customers will message.
- Authorize the app on that Page when Meta asks.
4
Generate and copy the Page Access Token
- Select the Page in the Page dropdown. A token appears in the Page Access Token field.
- Select the field to copy the token.
5
Find the numeric Page ID
Artemis routes on the Page’s numeric ID, which is a different value from everything else Meta shows you about the Page.
- Open the Page in Facebook and look under its About information, where Facebook lists the Page ID among the page’s transparency details.
- Or open the Page’s settings in Meta Business Suite, which also shows it.
6
Copy the App Secret
The App Secret sits outside the Messenger section, so the left menu is the only route to it.
- Go to App settings -> Basic.
- Select Show beside App secret.
- Re-enter your Facebook password when Meta asks, then copy the value.
7
Choose a Verify Token
Invent a high-entropy secret string. Meta doesn’t issue this one, so you create it and enter the same value twice: once in Artemis, once in the Meta webhook configuration.Artemis lets you save a connection without it, but Meta’s verification can’t succeed until a matching non-empty value exists in both places.
8
Add testers and plan for Live mode
While the app stays in development mode, Page tokens reach only Facebook accounts holding an administrator, developer, or tester role on the app.
- Grant those roles from the Roles tab of your app settings, which Meta describes under standard access.
- Have each person accept the invitation before you test with them.
- Before ordinary customers can message the Page, submit the app for review on the messaging permissions, complete business verification, and switch the app to Live mode using the control at the top of the App Dashboard.
Artemis channel configuration
Create the connection before you configure the callback in Meta. Meta sends its verification request the moment you save the webhook, and Artemis can only answer that challenge from a stored Verify Token.- Open Artemis and select the project.
- Go to Deployments -> Channels -> Messenger -> + New. The New Messenger Connection dialog opens.
-
Configure the following fields:
- Select Create.
- Open the connection and copy the Webhook URL from the Overview tab. You need it for the next section.
Webhook configuration in Meta
Registration has two halves, and completing only the first is the most common way a setup fails silently. Meta verifies the URL whether or not you subscribe to anything.1
Open the webhook controls
- Return to the Messenger settings screen in the same Meta app.
- Find the webhooks area and add a callback for the Page object.
2
Enter the callback URL and Verify Token
- Paste the Artemis Webhook URL exactly as shown.
- Enter the same Verify Token you saved in Artemis.
3
Complete the verification challenge
Save the callback. Meta immediately calls the URL with a subscribe challenge and expects your Verify Token echoed back.Artemis answers only when the token matches an active connection, so a failure here points at the token, the connection status, or public reachability over HTTPS rather than at the URL itself.
4
Subscribe to messages and messaging_postbacks
- In the webhook fields list, select Manage.
- Subscribe the Page webhook to
messagesandmessaging_postbacks.
messages field carries text, attachments, and quick-reply payloads, so it’s required even for an agent that only handles text. Subscribe messaging_postbacks as well if your agent sends buttons, since a button tap arrives as a separate event type carrying the authored payload rather than as a message.5
Subscribe the Page and save
- Confirm this app and webhook list the intended Page as subscribed.
- Save the app changes.
Validation checklist
Verify the connection
Artemis doesn’t synthesize Meta events, so a real Messenger conversation is the only end-to-end proof.- While the app sits in development mode, use a Facebook account holding an app or Page role. Open the connected Page in Messenger and send a short message you can search for later. Confirm Meta reports a successful webhook delivery and that Artemis opens one session.
- Check that a single outbound reply appears in the same conversation. A send failure at this point usually means the token belongs to the wrong Page, the messaging permission is missing, someone revoked the token, or the app mode still restricts delivery.
- Trigger a quick reply and a button postback, and confirm each returns to the same session. Artemis normalizes both into action events, so the authored action ID and value still have to exist in the agent.
- Send each message type your Page will use. Artemis downloads image, video, audio, and file attachments before the agent processes them. Location, sticker, and fallback attachments arrive as events rather than as files, so an agent that expects a downloadable attachment won’t find one.
- Once Meta approves the app and you switch it to Live mode, run the same test from an account with no app or Page role. This is the only check that proves ordinary customers can reach the agent.
Messenger limits
Meta enforces these boundaries on outbound content, and Artemis applies them before it calls the Send API. Design your agent’s responses to fit them.Secure the connection
Messenger authentication runs in one direction only, which is easy to misread. Meta signs what it sends you; your Verify Token does nothing after setup. Every Messenger POST carriesX-Hub-Signature-256. Artemis computes HMAC-SHA256 over the raw request body using your App Secret and rejects a missing or mismatched signature. Any proxy or middleware in front of Artemis has to preserve the exact request bytes, because reformatting the JSON changes the digest even when the content stays identical.
Keep the three secrets distinct in your own operational notes. The Verify Token protects only the initial challenge and is a string you invented. The App Secret authenticates inbound traffic. The Page Access Token authorizes outbound sends, and you can rotate it without touching the Page ID, so a token rotation never requires a new connection.
Artemis rejects Messenger events older than five minutes as replay protection. Replaying a captured payload during debugging therefore fails by design, and a live message is the only way to retest.
Use separate Meta apps or Pages, credentials, callbacks, and connections for development and production.
Manage the channel connection
Opening a connection shows four tabs. The delete control sits beside the connection name.- Overview
- Credentials
- Configuration
- Deployment
Connection Summary reports the connection’s state and identity.
Setup Instructions shows the Webhook URL to register in Meta and the Facebook Page ID this connection matches events to, each with a copy control. Check the Page ID here first when messages arrive and no session appears.
Troubleshoot connection issues
Meta reference
Use these Meta pages when you need detail beyond what this article covers.
Related articles: