TABLE OF CONTENTS
- Where can I get parameters (like tag ID)?
- Contact ID -- in contact card in Contacts;
- How to work with /fb/subscriber/setCustomField API method
- How to work with /fb/subscriber/findByCustomField API method
- Is there any limit to a number of API calls?
- What is API Key?
From this article, you will learn how to generate a token for ManyChat API and where to get parameters.
The URL to the website listing all the API commands can be found HERE.
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 a successful token generation, you can use our Swagger to experiment with API. It is available here.
To add your token to Swagger, click 'Authorize' button here:
To authorize your token type Bearer
You also can Refresh or Delete your token in the API settings tab.
Where can I get parameters (like tag ID)?
Contact ID -- in contact card in Contacts;
- 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?
Yes, ManyChat has a request-based limit. Please refer to the table below for details. When you reach the limits ManyChat may stop processing requests for 24 hours.
What is API Key?
It is a code used to identify the user, developer, or calling program for a website. ManyChat provides API Key (PRO-feature) to use with the Account Public API. Public API Key can be found in Settings ⇒ API.
There is also a Profile Public API that's used for connection to non-bot-specific things like Templates. It requires a different key that can be found here: https://manychat.com/profile/dashboard#settings.