THIS FEATURE IS CURRENTLY IN BETA!
From this article you will learn how to generate a token for ManyChat API and where to get parameters.
How to generate and authorize your token
To use ManyChat API, you need to generate a token. Navigate to Settings -> API and click Generate your Token button.
Please note: Refreshing and Deleting your token will disable all connected API methods!
After successful token generation you can use our Swagger to experiment with API. It is available here.
To add your token to Swaggerclick 'Authorize' button here:
To authorize your tokentype Bearer <your token> and click 'Authorize':
You also can Refresh or Delete your token in API settings tab.
Where can I get parameters (like tag ID)?
- Subscriber ID -- in user card in Audience;
- Flow_ns -- grab it from your Flow URL;
- Tag ID, Custom User Field ID -- use /fb/page/getTags API method to get list of all Tag IDs and /fb/page/getCustomFields for CUF IDs.
How to work with /fb/subscriber/setCustomField API method
Depending on the type of Custom User Field, you need to use one of the following types of data for "field_value":
- Text -- ex. "text"
- Number -- ex. 123
- Boolean -- ex. "true"or "false"
- Date -- ex. “2018-07-18”
- Date and time -- ex. “2018-07-02T00:00:00+00:00"
How to work with /fb/subscriber/findByCustomField API method
You can search for a list of users who have a specific value in a specific Custom User Field.
- This API method only works with Text and Number types of Custom User Fields.
- Results are sorted by last Custom User Field value update for a specific user.
- List is limited by 100 elements.
Is there any limit to a number of API calls?
There is only a RPS limit for POST methods (per page):
- /fb/sending/sendFlow, /fb/sending/sendContent - 25 RPS;
- /fb/subscriber/addTag, /fb/subscriber/removeTag, /fb/subscriber/setCustomField - 10 RPS.