> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olanna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Messenger

By the end of this, messages people send to your Facebook Page will land in Olanna. Your agent will answer them.

Messenger is owned by Meta, the company behind Facebook. So most of this happens on Meta's website, not in Olanna. Here is the whole job:

1. Set up an account with Meta.
2. Copy four things from Meta into a note.
3. Paste those four things into Olanna.
4. Tell Meta to start sending your messages to Olanna.

Set aside 15 to 20 minutes. Use a computer, not your phone.

<Note>
  Meta changes these pages now and then. A button might not be exactly where this guide says. Look for the words, not the place, and you will find it.
</Note>

### **Before you start**

You need a Facebook Page for your business, and you need to be an admin of it. If you do not have one, make it at facebook.com/pages/create first.

You also need a Meta business account with that Page added to it. Part 2 covers making one.

### **Part 1: Open a blank note**

You are about to collect four things from Meta. Keep them in one place so you do not lose any.

Open a blank note on your computer. Leave it open in its own window.

Type these four lines into it. Fill each one in as you reach it.

```text theme={null}
Page ID:
Page access token:
App secret:
Verify token:
```

### **Part 2: Set up your Meta business account**

Skip to Part 3 if you already have one. Meta calls it Meta Business Suite, or Business Manager. It is the same thing.

<Steps>
  <Step title="Open Meta's business site">
    Go to business.facebook.com.
  </Step>

  <Step title="Choose Create Account">
    The button is near the top of the page.
  </Step>

  <Step title="Type your name and email">
    Your business name, your own name, and your work email. Then choose **Submit**.
  </Step>

  <Step title="Add your business details">
    Fill in what Meta asks for.
  </Step>

  <Step title="Confirm your email">
    Open the email Meta sends you and click the link in it.
  </Step>

  <Step title="Add your Facebook Page">
    If your Page is not already in this account, add it now.
  </Step>
</Steps>

### **Part 3: Create a Meta app**

Meta will ask you to make something called an app. It is not an app anyone downloads. It is a box that holds your connection. Meta will not let Olanna handle your messages without one. You make it once, then leave it alone.

If you already made one while connecting WhatsApp or Instagram for this business, use that one and skip to Part 4.

<Steps>
  <Step title="Go to Meta's developer site">
    Open developers.facebook.com and log in with the same account as Part 2.
  </Step>

  <Step title="Start a new app">
    Choose **My Apps**, then **Create App**.
  </Step>

  <Step title="Pick Business as the type">
    Meta asks what type of app this is. Choose **Business**.
  </Step>

  <Step title="Name it after your business">
    Something you will recognise in a year, like "Marina Property Olanna".
  </Step>

  <Step title="Finish creating it">
    Link it to the business account from Part 2, then choose **Create App**.
  </Step>
</Steps>

### **Part 4: Add Messenger and pick your Page**

<Steps>
  <Step title="Set up Messenger">
    On your app's dashboard, find **Messenger** and choose **Set up**.
  </Step>

  <Step title="Open the Pages list">
    Look for **Access Tokens**, then choose **Add or Remove Pages**.

    <Frame caption="Your Pages are chosen under Access Tokens.">
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/olanna/images/messenger/01-add-remove-pages.png" alt="The Messenger Access Tokens section with the Add or Remove Pages button" />
    </Frame>
  </Step>

  <Step title="Pick your Page">
    Select the Facebook Page you want to connect. Say yes to the permissions Meta asks for.
  </Step>
</Steps>

### **Part 5: Copy your Page ID**

An ID is a number Meta uses to tell one thing from another.

<Steps>
  <Step title="Open your Facebook Page">
    Go to the Page itself, not the developer site.
  </Step>

  <Step title="Go to About">
    Choose **About** in the left menu. On some Pages it is called **Page transparency**.
  </Step>

  <Step title="Find the Page ID">
    Scroll down until you see **Page ID**. It is a long number. Copy it into your note.

    <Frame caption="The Page ID is far down the About section.">
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/olanna/images/messenger/02-page-id.png" alt="The Facebook Page About section showing the Page ID" />
    </Frame>
  </Step>
</Steps>

### **Part 6: Make your page access token**

An access token is a long password. It is what lets Olanna into your Page.

<Steps>
  <Step title="Open Messenger settings">
    Go back to developers.facebook.com. Open your app, then **Messenger**, then **Settings**.
  </Step>

  <Step title="Generate a token for your Page">
    Under **Access Tokens**, find your Page in the list and choose **Generate Token** next to it.

    <Frame caption="Generate Token sits beside your Page, not above it.">
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/olanna/images/messenger/03-generate-token.png" alt="The Messenger settings page generating a page access token" />
    </Frame>
  </Step>

  <Step title="Approve the permissions">
    Say yes to anything Meta asks for. A long line of letters and numbers appears.
  </Step>

  <Step title="Copy it into your note">
    Do this before you close the window.
  </Step>
</Steps>

<Tip>
  The token made on this page is quick to get, but it may stop working after a while. For one that lasts, go to business.facebook.com and choose **Settings**, then **Users**, then **System Users**. Add one named "Olanna Integration" with the role Admin. Choose **Add Assets** and pick your Page. Then choose **Generate New Token**, pick your app, and tick the permission **pages\_messaging**.
</Tip>

### **Part 7: Copy your app secret, then make up a verify token**

**App secret.** This is another password. It proves the app belongs to you.

<Steps>
  <Step title="Open your app">
    Go to developers.facebook.com and open the app you made.
  </Step>

  <Step title="Go to Settings, then Basic">
    Both are in the left menu.
  </Step>

  <Step title="Reveal the app secret">
    Find **App Secret** and choose **Show**. Meta might ask for your password.
  </Step>

  <Step title="Copy it into your note">
    That is three of your four lines done.
  </Step>
</Steps>

**Verify token.** You make this one up yourself. It is not copied from anywhere. Any word or phrase will do, like `marina-fb-2026`.

Write it into your note exactly as you typed it. You will type the same thing in two places later, and they have to match.

Your note should now have all four lines filled in.

### **Part 8: Paste it into Olanna**

<Steps>
  <Step title="Open Channels">
    In Olanna, choose **Channels** in the left menu.
  </Step>

  <Step title="Choose Connect on the Messenger row">
    A form opens with a box for each of your four things.
  </Step>

  <Step title="Copy your note into the boxes">
    Each line of your note goes in the box with the same name.

    <Frame caption="All four values from your note, in Olanna.">
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/olanna/images/messenger/04-olanna-connect-form.png" alt="Olanna's Messenger connect form filled in" />
    </Frame>
  </Step>

  <Step title="Choose Install">
    Olanna checks with Meta that your page access token really works for the Page ID you entered, and that your app secret belongs to the same app.
  </Step>
</Steps>

If something does not match, the message tells you which one. Troubleshooting is at the bottom of this page.

### **Part 9: Tell Meta where to send your messages**

Meta now trusts Olanna. But it still does not know where to send your messages. This part gives it the address.

That address is called a webhook URL. It is a long web address. You copy it out of Olanna and paste it into Meta. Nothing will arrive until you do.

<Steps>
  <Step title="Copy your webhook URL from Olanna">
    On the Channels page, open your Messenger row and copy the **Webhook URL**.
  </Step>

  <Step title="Open Webhooks in Meta">
    Go to developers.facebook.com, open your app, then **Messenger**, then **Settings**, then **Webhooks**.
  </Step>

  <Step title="Add a callback URL">
    Choose **Add Callback URL**. If there is one there already, choose **Edit**.
  </Step>

  <Step title="Paste in the address">
    Put the Webhook URL into the **Callback URL** box.
  </Step>

  <Step title="Type your verify token">
    In the **Verify Token** box, type the phrase you made up in Part 7. It has to match what is in Olanna exactly. Same capital letters. No spaces at either end.

    <Frame caption="Callback URL from Olanna, verify token from your note.">
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/olanna/images/messenger/05-webhook-config.png" alt="The Messenger Webhooks section with Callback URL and Verify Token fields" />
    </Frame>
  </Step>

  <Step title="Verify and save">
    Choose **Verify and Save**.
  </Step>

  <Step title="Tick messages for your Page">
    Below that, find your Page in the **Webhook subscriptions** list. Make sure **messages** is ticked.
  </Step>
</Steps>

### **Part 10: Test it**

<Steps>
  <Step title="Use a different Facebook account">
    Not the Page's owner. Open Messenger on it.
  </Step>

  <Step title="Message your Page">
    Send it any short message.
  </Step>

  <Step title="Check your Olanna inbox">
    It should be there within a few seconds. If nothing arrives after a minute, see Troubleshooting.
  </Step>
</Steps>

<Note>
  When your agent replies on Messenger, Facebook sends that reply back to Olanna as a copy. Olanna ignores those, so you will not see your own replies twice in the inbox.
</Note>

You can close your note now. Or keep it somewhere safe, in case you ever need to connect again.

### **Questions**

<AccordionGroup>
  <Accordion title="Can I connect more than one Facebook Page?">
    One Page per business through this screen. Contact support if you need more.
  </Accordion>

  <Accordion title="Do I need a personal Facebook account to manage the Page?">
    Yes. Facebook Pages are always run through a personal login. The Page itself is what your customers see and message.
  </Accordion>

  <Accordion title="Can I reuse the Meta app I made for WhatsApp or Instagram?">
    Yes. One Meta app can hold WhatsApp, Messenger and Instagram together. You do not need a separate one for each.
  </Accordion>

  <Accordion title="Do I need to keep the Meta app after this?">
    Yes. It is what keeps the connection alive. You do not have to open it again, but do not delete it.
  </Accordion>
</AccordionGroup>

### **Troubleshooting**

<AccordionGroup>
  <Accordion title="Access token is not valid on either graph.facebook.com or graph.instagram.com">
    The page access token does not belong to the Page ID you entered, or it has expired. Go back to Part 6 and make it again. Then open the connection in Olanna, choose Edit, paste the new token, and save.
  </Accordion>

  <Accordion title="App Secret is incorrect for this app">
    The app secret came from a different Meta app than the one that made your page access token. Copy it again from Settings, then Basic, on that same app.
  </Accordion>

  <Accordion title="Meta shows an error when I choose Verify and Save">
    The verify token you typed into Meta does not match the one saved in Olanna. A space on the end is the usual cause. Also check you finished Part 8 first, because Meta's check needs a live connection to work against.
  </Accordion>

  <Accordion title="Messages are not arriving in Olanna">
    Check that your Page shows under Webhook subscriptions with messages ticked. Check the channel says Active in Olanna, not Error.
  </Accordion>

  <Accordion title="I lost my access token or app secret">
    Neither can be looked up once hidden. But you can make a new one from Part 6 or Part 7 and update it in Olanna. You will not lose your Page or your messages.
  </Accordion>

  <Accordion title="Still stuck">
    Contact support. Tell us which part you are on, and the exact words of the error. A screenshot is best.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.