navvygator/manychat-php-sdk

Unofficial PHP SDK for ManyChat API

v1.0.0 2022-11-08 06:59 UTC

This package is auto-updated.

Last update: 2025-06-08 12:47:32 UTC


README

This is unofficial SDK based on the ManyChat public API: https://api.manychat.com/swagger

Requirements

  • php 7.1+

Installing

The recommended way to install Guzzle is through Composer.

composer require navvygator/manychat-php-sdk

Samples

Initialize client

$apiKey = '12345678987654321:aabbccddeeff11223344ffddbbccaa';
$client = new ManychatClient($apiKey);

Work with page-scoped API

$client->page()->getInfo(); //get page's info
$client->page()->createTag('new API tag'); //create new tag
$client->page()->createBotField('New bot field', 'number', 'test bot field', 88);

Work with subscriber-scoped API

$subscriber = $client->subscriber()->findByName('John Smith'); // find subscriber by full name
$subscriber = $client->subscriber()->getInfo(257545534557); //get the subscriber's info by subscriber id
$client->subscriber()->addTagByName(257545534557, 'new API tag'); // apply tag to subscriber

Work with sending API

$client->sender()->sendContent(257545534557, $content); // send dynamic content to the subscriber
$client->sender()->sendFlow(257545534557, 'flow_123'); //send flow to the subscriber