Skip to main content
Back to messaging or digital channels Connect an Instagram professional account to your agent so people reach it through Instagram direct messages. Instagram messaging runs on the Messenger Platform. You prepare a Meta app and a Facebook Page alongside the Instagram account, then register a signed webhook that Meta verifies before it sends anything. The setup requires:
  1. Instagram and Meta setup: Confirm the account is professional, link it to a Facebook Page, add the Instagram product to a Meta app, and collect the account ID, Page Access Token, and App Secret.
  2. Artemis channel configuration using those values, then copy the generated webhook URL.
  3. Webhook configuration in Meta: Verify the callback and subscribe the professional account to the message events.
After the configuration is complete, a direct message to the professional account opens a session in Artemis, the bound deployment answers it, and the reply returns to the same Instagram conversation. Important considerations
  • Instagram messaging runs through a Facebook Page: The Page issues the access token that authorizes outbound replies, so the Instagram account, the Page, the Meta app, the App Secret, and the webhook subscription all have to belong to one linked set. Values from two apps produce failures that look unrelated to each other.
  • Three Meta identifiers compete for one field: Artemis routes on the Instagram Account ID. The Facebook Page ID, the Meta App ID, and the Instagram-scoped ID that identifies a customer all appear nearby and none of them route.
  • Create the connection before the webhook: Meta’s verification challenge carries the Verify Token but no account ID, so Artemis finds the connection by the stored token. An unsaved connection fails verification.
  • Development mode limits who can test: Only assigned app roles and eligible testers can exercise the integration until you complete permission review and switch the app to Live.

Prerequisites

  • An Instagram Business or Creator account. A personal account can’t support this integration, and converting it is the first step below.
  • A Facebook Page linked to that Instagram account, on which your account can perform the messaging and moderate tasks. Meta requires both tasks of whoever generates the Page Access Token.
  • A Meta developer account with permission to create a business app, add the Instagram product, and reveal the 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 for the account to one generic URL, so Artemis identifies the connection from the payload rather than the path. It reads the Instagram account ID out of the signed event and matches it to a connection. Artemis scopes each conversation to the account and the sender together, so one person messaging two of your professional accounts holds two separate sessions.

Instagram and Meta setup

Do this work in Instagram and Meta before you open Artemis. Meta covers the same ground in its Instagram messaging get started guide.
1

Confirm the account is professional

  1. Open the Instagram app and go to your profile.
  2. Open the menu, then Settings and privacy.
  3. Find the account type setting and switch the account to Business or Creator.
Instagram messaging works only on a professional account, and the Instagram Platform overview sets out what each account type supports. A personal account can’t support this integration at all, so confirm this before you spend time in the App Dashboard.
2

Link the account to a Facebook Page

  1. In Instagram, open the professional account settings and find the linked accounts or connected Page setting.
  2. Connect the Facebook Page that will issue the Page Access Token.
  3. Confirm the link from the Page side as well, so both surfaces agree.
The Page is what makes messaging work. Meta routes Instagram conversations through the linked Page, which is why the token you use later belongs to the Page rather than to Instagram.
3

Create or select a Meta business app

  1. Sign in to Meta for Developers and open My Apps.
  2. Create an app, choosing the business messaging use case, or open the app that will own this connection.
  3. Add the Instagram product and configure Instagram messaging for the linked Page and account.
Keep development and production on separate apps and accounts, because app mode and webhook subscriptions belong to the app.
4

Assign access and generate the Page Access Token

  1. Grant the app, its testers, and any system users the Instagram messaging and Page permissions they need.
  2. Complete any permission review Meta requires for your current app mode.
  3. Generate a Page Access Token for the linked Page and copy it.
Meta requires the instagram_manage_messages permission on the token, and requires that whoever requests it can perform the messaging and moderate tasks on the Page. A token generated without both produces a clean-looking connection that fails on the first reply.Token lifetime follows the user token behind it. A short-lived user token yields a Page token good for about an hour. A long-lived user token yields one with no expiry, so use the long-lived path for anything beyond a first test.
5

Find the Instagram Account ID

Artemis routes on the numeric professional account ID, which is neither the @username nor the Page ID.Meta surfaces it in the Instagram messaging setup area of the App Dashboard alongside the connected account. You can also query the linked Page for its connected Instagram professional account in the Graph API Explorer, which returns the same numeric ID.Don’t substitute the @username, the Facebook Page ID, the Meta App ID, a profile URL, or the Instagram-scoped ID. That last one, the IGSID, appears in every inbound event and identifies the customer: Meta issues each person a different scoped ID for each account they message.
6

Copy the App Secret

  1. In the left menu of the App Dashboard, go to App settings -> Basic.
  2. Click Show beside App secret.
  3. Re-enter your Facebook password when Meta asks, then copy the value.
Take it from the same Meta app that owns the Instagram webhook. An App Secret from a neighboring app produces a signature failure on every event, which is a confusing failure to trace because nothing else looks wrong.
7

Choose a Verify Token

Invent a long random 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 form.Use a different value per environment, and treat it as a secret rather than a label. It’s your shared challenge secret, distinct from both the Page Access Token and the App Secret.
8

Plan for testers and Live mode

While the app sits in development mode, only accounts holding an app role or an eligible Instagram tester role can exercise the integration.Before ordinary people can message the account, complete permission review and switch the app to Live using the control at the top of the App Dashboard. A successful test with a role-holding account proves nothing about public access.

Artemis channel configuration

Create the connection before you configure the callback in Meta. Meta’s verification request carries the Verify Token but no account ID, so Artemis resolves the challenge from the stored token and needs the connection to exist and be active.
  1. Open Artemis and select the project.
  2. Go to Deployments -> Channels -> Instagram -> + New.
  3. Configure the following fields:
  4. Click Create.
  5. Open the connection and copy the Webhook URL from the Overview tab.
    Copy it exactly. The route carries no account identifier, and adding one breaks the callback rather than refining it.

Validation checklist


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

Enter the callback URL and Verify Token

  1. In the same Meta app, open the Instagram webhook configuration.
  2. Paste the Artemis Webhook URL exactly as shown.
  3. Enter the same Verify Token you saved in Artemis.
  4. Click the control that verifies and saves the callback.
Meta sends a subscribe challenge and expects your Verify Token echoed back. Artemis returns the challenge only when the token matches an active Instagram connection. A failure here points at the token, the connection status, or public reachability over HTTPS rather than at the URL itself.Don’t append an account ID, a connection ID, a query string, or a trailing segment.
2

Subscribe to messages and messaging_postbacks

Subscribe the Instagram webhook to messages and messaging_postbacks, then save the subscription.The messages field carries text, attachments, and quick-reply payloads, so it’s required even for an agent that only handles text. messaging_postbacks carries the action callbacks behind buttons and template elements.
3

Subscribe the intended professional account

Confirm the app connects to the same Instagram account, and that the Page subscription includes it.Artemis resolves each event by the account ID in the signed payload, so an app subscribed to a different account delivers events that no connection claims.
4

Preserve the signed request through your ingress

Meta signs every POST with X-Hub-Signature-256, and Artemis computes the HMAC over the exact raw bytes.Any proxy or middleware in front of Artemis has to pass the body through untouched and keep the header. Parsing and reserializing the JSON changes the digest even when the content stays identical, which produces a signature failure that looks like a credential problem.

Verify the connection

Artemis doesn’t synthesize Meta events, so a real Instagram conversation is the only end-to-end proof.
  1. From an account holding an app or Instagram tester role, send the professional account a short direct message you can search for later.
  2. Confirm Meta reports a successful delivery and that Artemis opens one session.
    Artemis ignores echo events, so your own outbound messages shouldn’t create extra turns.
  3. Check that a single reply reaches the original sender in the same conversation.
    A send failure here usually means the Page Access Token is wrong or expired, the account linkage broke, the messaging permission is missing, or the conversation has fallen outside the messaging window.
  4. Trigger an authored quick reply and a template action, and confirm each resumes the same session rather than starting a new one.
  5. Send an image, video, audio file, and document, and confirm the agent handles the downloaded attachment.
    Artemis downloads signed Meta CDN URLs promptly because they expire, so a delay in your own processing isn’t the same as a delivery failure.
  6. Once Meta approves the app and you switch it to Live, repeat the test from an account with no role. This is the only check that proves ordinary people can reach the agent.

Instagram channel behavior and limits

Meta enforces these boundaries, and Artemis applies its own download policy on inbound media. Design your agent’s responses to fit them.

Secure the connection

Instagram 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 POST requires X-Hub-Signature-256 generated with the matching App Secret, and Artemis rejects a missing or invalid signature before it queues anything. Signature validation covers the exact raw bytes, so preserve the request body, its content encoding, the header, and the external scheme through your ingress. Keep the three secrets distinct in your own operational notes. The Verify Token protects only the one-time challenge, and you rotate it in both Artemis and Meta together. The App Secret authenticates inbound traffic. The Page Access Token authorizes outbound messages, so encrypt it, redact it from logs, grant least privilege, monitor its expiry, and never expose it to browser code. Use separate Meta apps and accounts for development and production, or at minimum isolated credentials, tokens, webhook subscriptions, and connections.

Manage the channel connection

Opening a connection shows four tabs. The delete control sits beside the connection name.
Connection Summary reports the connection’s state and identity.Setup Instructions shows the Webhook URL to register in Meta and the Instagram Account ID this connection matches events to, each with a copy control. Check the account 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: