Skip to main content
This example requires Node.js 20 or later. Save it as anyx-read.mjs in a trusted local/backend environment. It uses only built-in modules; it does not install an agent package or connect to a CRM. Set ANYX_API_ORIGIN to https://anyx.dev and provide ANYX_MCP_KEY through trusted secret storage. For a local terminal test, use the hidden-input commands in the MCP quickstart. Never paste the key into an agent conversation. The script refuses other hosts and redirects.
The example prints returned data to the local terminal. Do not run it in a shared notebook, public CI log or remote logging service. It is a starter, not a durable sync engine. Review the code and choose your group/time range before a live message read.

Run

First list groups. Choose an ID from that result before reading messages.
Use your intended ISO timestamp rather than copying the example date unchanged. The API clamps the request to your current plan window.

Source

A real sync must store each page idempotently before saving its cursor, maintain progress per selected group and handle overlapping rescans. See the API contract and sync guide. This sample performs no CRM writes, sends, configuration changes or deployments.