PHPackages                             bootdesk/chat-sdk-adapter-instagram - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bootdesk/chat-sdk-adapter-instagram

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bootdesk/chat-sdk-adapter-instagram
===================================

Instagram adapter for bootdesk/chat-sdk-core

0.4.44(2w ago)0164MITPHPPHP &gt;=8.2

Since Jun 4Pushed 1w agoCompare

[ Source](https://github.com/bootdesk/chat-sdk-adapter-instagram)[ Packagist](https://packagist.org/packages/bootdesk/chat-sdk-adapter-instagram)[ RSS](/packages/bootdesk-chat-sdk-adapter-instagram/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (16)Versions (38)Used By (0)

bootdesk/chat-sdk-adapter-instagram
===================================

[](#bootdeskchat-sdk-adapter-instagram)

Instagram DM adapter for the laravel-bootdesk multi-platform messaging framework.

Install
-------

[](#install)

```
composer require bootdesk/chat-sdk-adapter-instagram
```

Requires a PSR-18 HTTP client (`guzzlehttp/guzzle`, `symfony/http-client`, etc.) and a PSR-17 factory (`nyholm/psr7` bundled).

Configuration
-------------

[](#configuration)

VariableDescriptionExample`page_access_token`Facebook Page Access Token`EAAx...``http_client`PSR-18 HTTP client instance`new GuzzleHttp\Client``app_secret`Facebook App Secret`abc123...``verify_token`Webhook Verify Token`my-verify-token````
use BootDesk\ChatSDK\Instagram\InstagramAdapter;

$adapter = new InstagramAdapter(
    pageAccessToken: env('INSTAGRAM_PAGE_ACCESS_TOKEN'),
    httpClient: new \GuzzleHttp\Client,
    appSecret: env('INSTAGRAM_APP_SECRET'),
    verifyToken: env('INSTAGRAM_VERIFY_TOKEN'),
);
```

### Laravel

[](#laravel)

The `ChatServiceProvider` auto-binds `Psr\Http\Client\ClientInterface` to `GuzzleHttp\Client`. Add to `config/chat.php`:

```
'instagram' => [
    'page_access_token' => env('INSTAGRAM_PAGE_ACCESS_TOKEN'),
    'app_secret'        => env('INSTAGRAM_APP_SECRET'),
    'verify_token'      => env('INSTAGRAM_VERIFY_TOKEN'),
],
```

Quick Example
-------------

[](#quick-example)

```
// Send a message to a user
$adapter->postMessage('instagram:1234567890', 'Hello from laravel-bootdesk!');
```

Text Formatting
---------------

[](#text-formatting)

Instagram supports `*bold*`, `_italic_`, `~strikethrough~`, ``monospace``, and ` `code blocks` ` syntax (same as Messenger — both use the Meta Send API). The SDK's `InstagramFormatConverter` automatically converts standard markdown (`**bold**`, `~~strike~~`) to Instagram format when sending, and converts Instagram syntax back to standard markdown when receiving.

Message Templates
-----------------

[](#message-templates)

Instagram supports rich message templates via `PostableMessage::template()` with `InstagramTemplate`:

```
use BootDesk\ChatSDK\Instagram\InstagramTemplate;

// Button template
$adapter->postMessage('instagram:1234567890', PostableMessage::template(
    InstagramTemplate::create('options')
        ->buttonTemplate('Choose an option', [
            ['type' => 'postback', 'title' => 'Yes', 'payload' => 'YES'],
            ['type' => 'postback', 'title' => 'No', 'payload' => 'NO'],
        ])
));

// Generic template (carousel)
$adapter->postMessage('instagram:1234567890', PostableMessage::template(
    InstagramTemplate::create('catalog')
        ->genericTemplate([
            [
                'title' => 'Product A',
                'subtitle' => 'Best seller',
                'image_url' => 'https://example.com/a.jpg',
                'default_action' => ['type' => 'web_url', 'url' => 'https://example.com/a'],
                'buttons' => [['type' => 'web_url', 'title' => 'Buy', 'url' => 'https://example.com/a/buy']],
            ],
        ])
));

// Media template
$adapter->postMessage('instagram:1234567890', PostableMessage::template(
    InstagramTemplate::create('intro')
        ->mediaTemplate('https://example.com/video.mp4', 'video', [
            'type' => 'web_url', 'title' => 'Learn More', 'url' => 'https://example.com',
        ])
    )
);
```

### All Template Types

[](#all-template-types)

MethodTemplate Type`buttonTemplate(string $text, array $buttons)`Button — text with up to 3 buttons`genericTemplate(array $elements)`Generic — cards with title, subtitle, image, buttons`mediaTemplate(string $url, string $mediaType, ?array $button)`Media — image/video with optional button`receiptTemplate(recipientName, orderNumber, currency, ...)`Receipt — order confirmation`productTemplate(string $productId)`Product — catalog product card`couponTemplate(title, code, ...)`Coupon — promotional offer`customerFeedbackTemplate(title, businessAddress, ratingOptions, ...)`Customer Feedback — native surveyCards from the SDK `Card` class (title, sections, images, buttons) are automatically rendered as **button** or **generic** templates.

Thread ID Format
----------------

[](#thread-id-format)

FormatDescription`instagram:{senderId}`One thread per senderWebhook
-------

[](#webhook)

Instagram sends webhook events to your endpoint. Verify requests using HMAC signature verification with the app secret (`X-Hub-Signature-256` header).

Feature Matrix
--------------

[](#feature-matrix)

FeatureSupportedPost messages✓Edit messages✗Delete messages✓Reactions✓Slash commands✓Typing indicator✓Fetch messages✗Fetch thread info✗Fetch channel info✗Get user✗Open DM✗Stream✓Notes
-----

[](#notes)

Instagram Messaging API. Shares the same Graph API structure as Facebook Messenger with `object: 'instagram'` instead of `object: 'page'`. Supports quick replies, persistent menu, and get started button. Rich templates available via `InstagramTemplate` (button, generic, media, receipt, product, coupon, customer feedback).

Documentation
-------------

[](#documentation)

Full API documentation:

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance97

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

37

Last Release

14d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3874705?v=4)[Vin](/maintainers/tryvin)[@tryvin](https://github.com/tryvin)

---

Top Contributors

[![tryvin](https://avatars.githubusercontent.com/u/3874705?v=4)](https://github.com/tryvin "tryvin (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bootdesk-chat-sdk-adapter-instagram/health.svg)

```
[![Health](https://phpackages.com/badges/bootdesk-chat-sdk-adapter-instagram/health.svg)](https://phpackages.com/packages/bootdesk-chat-sdk-adapter-instagram)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M425](/packages/drupal-core-recommended)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[shopware/app-php-sdk

Shopware App SDK for PHP

15109.8k3](/packages/shopware-app-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
