- Instagram and Meta setup: prepare the account, Page, and app, and collect four values.
- Artemis channel configuration: create the connection, then copy its Webhook URL.
- Webhook configuration in Meta: verify the callback and subscribe the account.
- Verify the connection with real messages, actions, and media.
- The Instagram Account ID selects the connection: Artemis reads the account ID from
entry.idin each signed webhook and matches it to the connection. The linked Page Access Token must message on behalf of that same account. - Three IDs look alike: Artemis routes on the Instagram Account ID. The Facebook Page ID and each customer’s sender ID appear nearby and never route.
- Create the connection before you verify the webhook: Meta’s verification request carries the Verify Token but no account ID, so Artemis finds the connection by the stored token.
- Development mode limits testing: Only app roles and Instagram testers reach the agent until you complete review and switch the app to Live.
Prerequisites
Confirm these before you start.- An Instagram Business or Creator account. Personal accounts can’t use this integration.
- A Facebook Page linked to that account, where you can perform the messaging and moderate tasks.
- A Meta developer account that can create a business app and reveal its App Secret.
- Artemis project access with permission to open Deployments -> Channels, and a deployed agent in the environment you intend to bind.
How Artemis routes Instagram events
Meta sends every event to one generic URL, so Artemis identifies the connection from the signed payload.
Artemis scopes each conversation to the account and the sender together, as an
instagram:{accountId}:{senderId} session.
Instagram and Meta setup
Do this in Instagram and Meta before you open Artemis. Select Open Meta for Developers in the setup guide to jump straight there. Meta covers the same ground in its Instagram messaging get started guide.1
Use a professional account
- In the Instagram app, open your profile, then the menu, then Settings and privacy.
- Switch the account type to Business or Creator.
2
Link the account to a Facebook Page
- In the professional account settings, connect the Facebook Page that will issue the Page Access Token.
- Confirm the link from the Page side too.
3
Create or select a Meta business app
- Open My Apps and create an app with the business messaging use case, or open an existing one.
- Add the Instagram product and configure Instagram messaging for the linked Page and account.
4
Assign access and generate the Page Access Token
- Grant the app, testers, and system users the Instagram messaging and Page permissions they need.
- Complete any permission review your app mode requires.
- Generate a Page Access Token for the linked Page.
instagram_manage_messages. A token from a short-lived user token lasts about an hour, and one from a long-lived user token doesn’t expire.5
Find the Instagram Account ID
Copy the numeric professional account ID from the Instagram messaging area of the App Dashboard. You can also query the linked Page for its connected Instagram account in the Graph API Explorer.Don’t use the
@username, the Facebook Page ID, the Meta App ID, a recipient PSID, or a profile URL.6
Copy the App Secret
- Go to App settings -> Basic.
- Select Show beside App secret, re-enter your password, and copy the value.
7
Choose a Verify Token
Create a long random value that only Artemis and the Meta webhook form know. Use a different value per environment.
Artemis channel configuration
Create the connection before you select Verify and Save in Meta. Artemis resolves Meta’s challenge from a hash of the saved Verify Token.- Open Artemis and select the project.
- Go to Deployments -> Channels -> Instagram -> + New. The New Instagram Connection dialog opens, with the setup guide on the left and the fields on the right.
-
Configure the fields:
- Select Create.
- Copy the Webhook URL from the connection’s summary panel. Don’t add an account ID or any suffix.
Webhook configuration in Meta
Registration has two halves. Meta verifies the URL whether or not you subscribe to anything, so finish both.- Confirm the Artemis connection exists and is Active.
- In the same Meta app, open the Instagram webhook configuration and paste the Artemis Webhook URL exactly.
- Enter the same Verify Token and select Verify and Save. Meta sends
hub.mode=subscribe,hub.verify_token, andhub.challenge, and Artemis returns the challenge only when the token matches an active Instagram connection. - Subscribe to
messagesfor text, attachments, and quick replies, andmessaging_postbacksfor action callbacks. Save the subscription. - Confirm the app and the Page subscription connect the same Instagram account. Artemis rejects a connection mismatch.
- Make sure any proxy in front of Artemis keeps
X-Hub-Signature-256and passes the raw body unchanged.
Validation checklist
Work down this list once per connection.Verify the connection
Artemis doesn’t synthesize Meta events, so a real Instagram conversation is the only end-to-end proof.- While the app is in Development, send from an account with an app or Instagram tester role. A public user proves nothing until review and Live mode are complete.
- Send a unique text to the professional account. Confirm one signed
messagesevent, one session, and no processing of echo events. - Confirm the reply reaches the original sender through
/{InstagramAccountId}/messages, inside the messaging window. - Select an authored quick reply and a generic-template action. Confirm each resumes the same
instagram:{accountId}:{senderId}session. - Send image, video, audio, and file attachments. Artemis downloads signed Meta CDN URLs promptly, before they expire, and applies size and attachment policy.
Instagram behavior and limits
Design agent responses to fit these limits.Security and lifecycle
Meta signs what it sends. Your Verify Token only protects the one-time challenge.- Signatures: Artemis rejects any POST without a valid
X-Hub-Signature-256before queueing. Preserve the request body, content encoding, header, external scheme, and proxy behavior through ingress. - Verify Token: Use a unique random value per environment, and rotate it in Artemis and Meta together.
- Page Access Token: It authorizes outbound messages. Encrypt and redact it, grant least privilege, monitor expiry, rotate it, and keep it out of browser code.
- Environments: Use separate Meta apps and accounts, or at least isolated credentials, tokens, subscriptions, and connections, for development and production.
Manage the channel connection
Open a connection from Deployments -> Channels -> Instagram to manage it. The page has a header, three tabs, and a summary panel on the right. Header. Shows the connection name, its environment badge, its status, and when it last changed. The … overflow menu holds the connection-level actions. Summary panel. Stays visible on every tab.- Credentials
- Configuration
- Deployment
Artemis encrypts credentials after you save them. Leave a field blank to keep its current value, or enter a new value to replace it.
Select Save Credentials to apply your changes.
Troubleshoot connection issues
Most failures trace to the token, the App Secret, or the subscription.Meta reference
Use these pages when you need detail beyond what this article covers.Related articles: