ManyChat App is a config in a JSON format, consisting of a few parameters.

Each parameter

Example:

{
  "auth": null,
  "actions": [
    {
      "name": "find_pokemon",
      "title": "Find pokemon",
      "description": "Search for pokemon information",
      "forms": [
        {
          "name": "pokemon_name",
          "type": "string",
          "title": "Enter pokemon name"
        }
      ],
      "requests": [
        {
          "url": "<https://pokeapi.co/api/v2/pokemon/[[pokemon_name]>]",
          "method": "GET",
          "headers": [
            "Content-Type: application/json"
          ],
          "mapping": [
            {
              "name": "pokemon_id",
              "path": "$.id",
              "type": "number",
              "title": "Pokemon id"
            },
            {
              "name": "pokemon_weight",
              "path": "$.weight",
              "type": "number",
              "title": "Pokemon weight"
            }
          ],
          "payload": null
        }
      ]
    }
  ]
}

Auth block

Auth Block configures an authentication. You, as a developer, can choose authentication type, set params array to capture info from end-users when they install your app and configure connection object to be added to each request.

Auth

Example 1: APIKEY Auth, headers

{
    "type": "APIKEY",
    "params": [
      {
        "name": "token",
        "title": "Enter your secret key:"
      }
    ],
    "connection": {
      "headers": {
        "Authorization": "Basic [[token]]"
      }
    }
  }

During the application's installation, the end-user provides a token. Then it's used as a variable [[token]] in an authorization header. ManyChat adds this header to each request, so there is no need to duplicate it inside requests block.

Example 2: APIKEY Auth, query parameters

{
    "type": "APIKEY",
    "params": [
      {
        "name": "token",
        "title": "Enter your secret key:"
      }
    ],
    "connection": {
      "qs": {
        "token": "[[token]]"
      }
    }
  }

ManyChat adds [[token]] as a query string, if qs object is specified.