Facebook

Get Messenger Profile

Returns the ice breakers and persistent menu of a Facebook Page's Messenger.

GET
/v1/accounts/{id}/messenger-profile

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Path Parameters

id*string
Length1 <= length

Response Body

Messenger profile

application/json
  1. response
accountId*string
iceBreakers*array<>

Questions shown when a conversation starts.

persistentMenu*array<>

Menu items shown in every conversation.

Example Request
import { Configuration, AccountsApi } from "@onepostly/sdk";const accountsApi = new AccountsApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await accountsApi.getMessengerProfile({  id: "acc_YOUR_FACEBOOK_ACCOUNT_ID",});console.log(response);
Example Response
{  "accountId": "acc_YOUR_FACEBOOK_ACCOUNT_ID",  "iceBreakers": [    {      "question": "What are your opening hours?",      "payload": "HOURS"    },    {      "question": "Do you deliver?",      "payload": "DELIVERY"    }  ],  "persistentMenu": [    {      "type": "web_url",      "title": "Order online",      "url": "https://example.com/order",      "payload": null    }  ]}