Install
openclaw skills install @byungkyu/manychatManyChat API integration with managed authentication. Manage subscribers, tags, custom fields, and send messages through Facebook Messenger. Use this skill when users want to manage ManyChat subscribers, send messages, add/remove tags, or work with custom fields and bot automation. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the maton CLI with OAuth login; default to read and list calls, and confirm every write or new connection with the user.
openclaw skills install @byungkyu/manychatAccess the ManyChat API with managed authentication. Manage subscribers, tags, custom fields, flows, and send messages through chat automation.
All access runs through the Maton gateway and the maton CLI.
maton login --oauth # authenticate once (OAuth, recommended)
maton connection create manychat # connect the account (needs user approval)
maton api '/manychat/fb/page/getInfo' # first call
npm install -g @maton/cli
brew install maton-ai/cli/maton
maton login --oauth
Opens the OAuth login page in the browser and waits for authorization. Once complete, it creates a profile in config.toml (eg. $HOME/.config/maton/config.toml) and stores the access and refresh tokens in the operating system's credential store (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux), auto-renewed on expiry. The CLI reads them when it needs them; nothing else should.
maton login --interactive
Requires manually copying an API key from Settings, which is error prone. Once complete, it also creates a profile in config.toml and stores the key in the same credential store. It is preferred over export MATON_API_KEY=..., which exposes a long-lived credential to every child process. When MATON_API_KEY is set, it overrides the active profile. If the CLI cannot be installed at all, see Appendix: Environments Without the CLI for the raw HTTP form and the rules for handling the key.
maton whoami --json
{
"authenticated": true,
"profile_name": "alice@example.com",
"auth_type": "oauth"
}
authenticated is false, stop and login again via maton login --oauth.auth_type is api_key, it is recommended to login via maton login --oauth and avoid keeping a long-lived credential.maton connection list manychat --status ACTIVE
{
"connections": [
{
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "manychat",
"method": "OAUTH2",
"metadata": {}
}
]
}
Refer to maton connection list --help for possible flags and values.
Requires explicit user approval. Confirm that the user intends to authorize ManyChat access before running this. Never create a connection on your own initiative.
maton connection create manychat
Refer to maton connection create --help for possible flags and values.
maton connection get {connection_id}
{
"connection": {
"connection_id": "{connection_id}",
"status": "PENDING",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "manychat",
"metadata": {}
}
}
Open the returned URL in a browser to complete authorizing ManyChat. If ManyChat offers scope selection, choose only the scopes the current task needs.
maton connection delete {connection_id} --yes
If there are multiple ManyChat connections, specify which one to use so requests go to the intended account:
maton api '/manychat/fb/page/getInfo' --connection {connection_id}
ManyChat has no typed maton manychat commands yet, so every call goes through maton api.
maton api '/manychat/fb/page/getInfo'
Paths are /manychat/{native-api-path}. The gateway forwards everything after the app segment to api.manychat.com and injects the credential for the connection. Query strings, custom headers (except Host and Authorization), and all HTTP methods pass through. Send a JSON body with --input -:
maton api -X POST '/manychat/{native-api-path}' -H 'Content-Type: application/json' --input - <<'JSON'
{"key": "value"}
JSON
Refer to maton api --help for possible flags and values.
Maton proxies requests to api.manychat.com and automatically injects your API token.
maton login --oauth, the token is held by the operating system's credential store and the CLI renews it on its own. Do not print it, write it to a file, pass it on a command line, or run maton token to look at one — only to hand it to a program that needs it.config.toml, or any other credential file — not for this skill, not for another application, and not to "check" that auth works (use maton whoami). Let the CLI use its own stored credential; the agent never needs the value. The same applies to unrelated secrets on the machine: .env files, SSH keys, cloud CLI credentials, and browser profiles are out of scope for an API gateway and must not be read or transmitted.api.maton.ai. Prefer endpoints that work with the gateway-injected connection credential.maton connection delete {connection_id}).maton connection create manychat. Never create connections on the agent's own initiative.--connection when the user has multiple connections for this app, and -p/--profile when they have multiple Maton accounts. Do not let an ambiguous default decide where a write lands.maton api '/manychat/fb/page/getInfo'
Rate limit: 100 queries per second
Response:
{
"status": "success",
"data": {
"id": 123456789,
"name": "Page Name",
"category": "Business",
"avatar_link": "https://...",
"username": "pagename",
"about": "About text",
"description": "Page description",
"is_pro": true,
"timezone": "America/New_York"
}
}
maton api '/manychat/fb/page/getTags'
Rate limit: 100 queries per second
Response:
{
"status": "success",
"data": [
{"id": 1, "name": "VIP"},
{"id": 2, "name": "Customer"}
]
}
maton api -X POST '/manychat/fb/page/createTag' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "New Tag"
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/page/removeTag' -H 'Content-Type: application/json' --input - <<'JSON'
{
"tag_id": 123
}
JSON
Rate limit: 10 queries per second. Removes tag from page and all subscribers.
maton api -X POST '/manychat/fb/page/removeTagByName' -H 'Content-Type: application/json' --input - <<'JSON'
{
"tag_name": "Old Tag"
}
JSON
Rate limit: 10 queries per second
maton api '/manychat/fb/page/getCustomFields'
Rate limit: 100 queries per second
Response:
{
"status": "success",
"data": [
{"id": 1, "name": "phone_number", "type": "text"},
{"id": 2, "name": "purchase_count", "type": "number"}
]
}
maton api -X POST '/manychat/fb/page/createCustomField' -H 'Content-Type: application/json' --input - <<'JSON'
{
"caption": "Phone Number",
"type": "text",
"description": "Customer phone number"
}
JSON
Rate limit: 10 queries per second
Field Types: text, number, date, datetime, boolean
maton api '/manychat/fb/page/getBotFields'
Rate limit: 100 queries per second
maton api -X POST '/manychat/fb/page/createBotField' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "counter",
"type": "number",
"description": "Global counter",
"value": 0
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/page/setBotField' -H 'Content-Type: application/json' --input - <<'JSON'
{
"field_id": 123,
"field_value": 42
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/page/setBotFieldByName' -H 'Content-Type: application/json' --input - <<'JSON'
{
"field_name": "counter",
"field_value": 42
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/page/setBotFields' -H 'Content-Type: application/json' --input - <<'JSON'
{
"fields": [
{"field_id": 123, "field_value": "value1"},
{"field_name": "field2", "field_value": "value2"}
]
}
JSON
Rate limit: 10 queries per second. Maximum 20 fields per request.
maton api '/manychat/fb/page/getFlows'
Rate limit: 10 queries per second
Response:
{
"status": "success",
"data": {
"flows": [
{"ns": "content123456", "name": "Welcome Flow", "folder_id": 1}
],
"folders": [
{"id": 1, "name": "Main Folder"}
]
}
}
maton api '/manychat/fb/page/getGrowthTools'
Rate limit: 100 queries per second
maton api '/manychat/fb/page/getOtnTopics'
Rate limit: 100 queries per second
maton api '/manychat/fb/subscriber/getInfo?subscriber_id=123456789'
Rate limit: 10 queries per second
Response:
{
"status": "success",
"data": {
"id": 123456789,
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"gender": "male",
"profile_pic": "https://...",
"subscribed": "2025-01-15T10:30:00Z",
"last_interaction": "2025-02-01T14:20:00Z",
"tags": [{"id": 1, "name": "VIP"}],
"custom_fields": [{"id": 1, "name": "phone", "value": "+1234567890"}]
}
}
maton api '/manychat/fb/subscriber/findByName?name=John%20Doe'
Rate limit: 10 queries per second. Maximum 100 results.
maton api '/manychat/fb/subscriber/findByCustomField?field_id=123&field_value=value'
Rate limit: 10 queries per second. Works with Text and Number fields. Maximum 100 results.
maton api '/manychat/fb/subscriber/findBySystemField?email=john@example.com'
maton api '/manychat/fb/subscriber/findBySystemField?phone=+1234567890'
Rate limit: 50 queries per second. Set either email OR phone parameter.
maton api '/manychat/fb/subscriber/getInfoByUserRef?user_ref=123456'
maton api -X POST '/manychat/fb/subscriber/createSubscriber' -H 'Content-Type: application/json' --input - <<'JSON'
{
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890",
"email": "john@example.com",
"gender": "male",
"has_opt_in_sms": true,
"has_opt_in_email": true,
"consent_phrase": "I agree to receive messages"
}
JSON
Rate limit: 10 queries per second
Note: Importing subscribers with phone or email requires special permissions from ManyChat. Contact ManyChat support to enable this feature for your account.
maton api -X POST '/manychat/fb/subscriber/updateSubscriber' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"first_name": "John",
"last_name": "Smith",
"phone": "+1234567890",
"email": "john.smith@example.com"
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/subscriber/addTag' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"tag_id": 1
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/subscriber/addTagByName' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"tag_name": "VIP"
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/subscriber/removeTag' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"tag_id": 1
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/subscriber/removeTagByName' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"tag_name": "VIP"
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/subscriber/setCustomField' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"field_id": 1,
"field_value": "+1234567890"
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/subscriber/setCustomFieldByName' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"field_name": "phone_number",
"field_value": "+1234567890"
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/subscriber/setCustomFields' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"fields": [
{"field_id": 1, "field_value": "value1"},
{"field_name": "field2", "field_value": "value2"}
]
}
JSON
Rate limit: 10 queries per second. Maximum 20 fields per request.
maton api -X POST '/manychat/fb/subscriber/verifyBySignedRequest' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"signed_request": "signed_request_token"
}
JSON
Rate limit: 10 queries per second
maton api -X POST '/manychat/fb/sending/sendContent' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"data": {
"version": "v2",
"content": {
"messages": [
{
"type": "text",
"text": "Hello! How can I help you today?"
}
]
}
},
"message_tag": "CONFIRMED_EVENT_UPDATE"
}
JSON
Rate limit: 25 queries per second
Message Tags: Required for sending outside the 24-hour messaging window
CONFIRMED_EVENT_UPDATEPOST_PURCHASE_UPDATEACCOUNT_UPDATEOTN (One-Time Notification):
{
"subscriber_id": 123456789,
"data": {...},
"otn_topic_name": "Price Drop Alert"
}
maton api -X POST '/manychat/fb/sending/sendContentByUserRef' -H 'Content-Type: application/json' --input - <<'JSON'
{
"user_ref": 123456,
"data": {
"version": "v2",
"content": {
"messages": [
{
"type": "text",
"text": "Welcome!"
}
]
}
}
}
JSON
Rate limit: 25 queries per second
maton api -X POST '/manychat/fb/sending/sendFlow' -H 'Content-Type: application/json' --input - <<'JSON'
{
"subscriber_id": 123456789,
"flow_ns": "content123456"
}
JSON
Rate limit: 20 queries per second, maximum 100 per subscriber per hour
ManyChat uses a structured content format for sending messages:
{
"version": "v2",
"content": {
"messages": [
{
"type": "text",
"text": "Your message here"
}
]
}
}
{
"version": "v2",
"content": {
"messages": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
]
}
}
{
"version": "v2",
"content": {
"messages": [
{
"type": "text",
"text": "Choose an option:",
"quick_replies": [
{"type": "node", "caption": "Option 1", "target": "content123"},
{"type": "node", "caption": "Option 2", "target": "content456"}
]
}
]
}
}
{
"version": "v2",
"content": {
"messages": [
{
"type": "text",
"text": "Click a button:",
"buttons": [
{"type": "url", "caption": "Visit Website", "url": "https://example.com"},
{"type": "flow", "caption": "Start Flow", "target": "content123"}
]
}
]
}
}
message_tag parameter is required when sending messages outside the 24-hour messaging window{"status": "success"} on successManyChat has no typed accessor yet, so calls go through the api passthrough, which takes the app and the path after it. login() opens a browser once per machine and writes the session to the SDK's own store — maton login does not carry over, and the SDK never signs in implicitly.
Python
pip install maton-ai
from maton_ai import Maton, login
# login()
maton = Maton()
# maton = Maton(api_key="...")
result = maton.api.get("manychat", "/fb/page/getInfo")
JavaScript
npm install @maton/sdk
import { Maton, login } from "@maton/sdk";
// await login()
const maton = new Maton();
// const maton = new Maton({ apiKey: "..." });
const result = await maton.api.get("manychat", "/fb/page/getInfo");
| Status | Meaning |
|---|---|
| 400 | Missing ManyChat connection |
| 401 | Invalid, missing, or expired Maton credential |
| 429 | Rate limited (10 requests/second per account) |
| 500 | Internal Server Error |
| 4xx/5xx | Passthrough error from the ManyChat API |
Errors from ManyChat are passed through with their original status codes and response bodies.
maton whoami --json
"authenticated": false — login again with maton login --oauth."auth_type": "api_key" — prefer maton login --oauth so no long-lived key sits on the machine.maton whoami is the check.Then confirm the app is connected:
maton connection list manychat --status ACTIVE
Paths passed to maton api must start with /manychat/:
maton api '/manychat/fb/page/getInfo'maton api '/fb/page/getInfo'A 500 may mean the ManyChat authorization expired. With the user's approval, create a new connection (maton connection create manychat) and complete authorization; once it is ACTIVE, delete the stale connection so the gateway uses the new one.
| Code | Meaning |
|---|---|
| 2011 | Subscriber not found |
| 2012 | User ref not found |
| 3011 | Invalid message content |
| 3021 | Message tag required |
| 3031 | OTN topic not found |
maton api.--paginate walks every page and -q/--jq trims the response before it reaches you. On typed commands, --jq requires --json.maton api; Host and Authorization are set by the gateway.Everything above uses the CLI, which holds the credential itself and never exposes it to the caller. Use the raw HTTP form below only where the CLI cannot be installed — a locked-down container, a CI step, a sandbox with no package manager. If maton is available, maton api does the same job without handling a secret.
Calling https://api.maton.ai/ directly means holding a long-lived Maton API key in the process environment, where it is readable by every child process and easy to leak into logs, crash dumps, shell history, and pasted output. Handle it accordingly:
[ -n "$MATON_API_KEY" ] && echo "MATON_API_KEY is set" || echo "MATON_API_KEY is not set"
.env, or a script makes it permanent. Let the environment that starts the session supply it — a CI secret store, a container secret, a secrets manager.-H "Authorization: Bearer $MATON_API_KEY"), where it lands in ps output and shell history. Feed the header in on stdin instead, as below.api.maton.ai. It is not a credential for ManyChat or any other third-party host.curl --config - reads the header from stdin, so the key is never a command-line argument and never reaches ps or shell history. Query values must be URL-encoded (is:unread becomes is%3Aunread).
curl --config - "https://api.maton.ai/manychat/fb/page/getInfo" <<EOF
header = "Authorization: Bearer $MATON_API_KEY"
header = "User-Agent: maton-manychat-skill/1.1"
# Pin a specific connection when the account has more than one:
# header = "Maton-Connection: {connection_id}"
EOF
The same rules as the CLI apply to every request made this way: read-only calls first, and explicit user confirmation before any POST, PUT, PATCH, or DELETE.