Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Notification Channel Instagram Laravel Package

ka4ivan/laravel-notification-channel-instagram

Send Laravel notifications through Instagram Messenger with this channel. Install via Composer, configure your Instagram API version, access token, and profile ID in services.php, then set start buttons using the provided Artisan command.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package is a thin adapter between Laravel’s notification abstraction and the Instagram Messaging API, so it slots into an existing Notification + via() architecture without introducing a new messaging platform, queue system, or data store. TPM leverage is highest when Instagram is modeled as an additional outbound engagement channel alongside email/SMS/push, reached through the same notifiable model and routeNotificationForInstagram() routing the team already understands. It fits poorly as a foundation for a conversational product: there is no webhook/inbound handler, no conversation state, no inbox, and no analytics.

Scope the package actually delivers: Outbound text messages, single and multi-attachment sends (attach, attachMany with AttachmentType::IMAGE|AUDIO|VIDEO), up to three call-to-action buttons (web_url, postback), per-message overrides for API version, access token, and profile ID, plus an Artisan command (instagram:set-start-buttons) to register ice-breaker start buttons. This is a legitimate MVP feature set for notifications, reminders, and promotions — it is not a customer-support stack.

Integration feasibility: Low engineering effort. Installation is composer require, credentials live in config/services.php under an instagram key fed by INSTAGRAM_API_VERSION / INSTAGRAM_ACCESS_TOKEN / INSTAGRAM_PROFILE_ID, and usage is a normal notification class returning InstagramMessage::create()->text(...). The changelog shows steady, small releases through 1.3.1 with Laravel 13 support, indicating the maintainer tracks framework upgrades. The real effort is not code — it is Meta-side: Instagram professional account, Meta app, correct messaging permissions, token issuance/refresh, and (for production access) platform review.

Technical risk: Material, and mostly external to the package.

  • Adoption risk: 5 stars and 0 dependents means near-zero community validation, no visible production users, and effectively a single-maintainer bus factor. Any Graph API change may leave the package broken with no timely patch.
  • Platform-policy risk: Delivery depends on Meta’s messaging rules — recipient must have an existing conversation/IGSID, the standard messaging window and message tags apply, and permissions can be revoked. These constraints shape the product, not just the code.
  • Credential risk: A long-lived page/profile token in env is a single point of failure with blast radius across every notification type routed through the channel; rotation and per-environment separation need an owner.
  • Abstraction risk: The fluent builders hide the raw payload, which is good for velocity and bad for debugging — when Meta rejects a payload, the failure surfaces as a generic API error unless the team logs the underlying response.
  • Operational gaps: No built-in rate-limit handling, retry/backoff, idempotency, delivery receipts, or metrics. Those must be supplied by the surrounding Laravel stack (queues, retryUntil, failed() hooks, monitoring).

Key questions for engineering before approval:

  1. Which endpoints does the channel call — graph.instagram.com (Instagram Login) or graph.facebook.com (Facebook Login)? This determines the app type, permission set, and token lifecycle we must provision.
  2. How are API errors surfaced — exceptions, silent false, or logged-only? Does a failed notification fail the job and retry, or disappear?
  3. Is the channel safe to queue, and does it respect per-profile rate limits? Do we need RateLimited middleware or a Redis throttle per profile ID?
  4. Does attachMany send one message or N messages, and how does that interact with ordering and rate limits?
  5. Are media URLs fetched by Meta or by us — do they need to be publicly reachable, and are the documented size limits (image 8MB; audio/video 25MB) enforced client-side or only rejected by the API?
  6. Does it validate the three-button cap and button types, or will invalid payloads fail at send time?
  7. Is there a test suite we can trust as a regression harness if we fork?
  8. What is the token rotation procedure, and can the channel read credentials from a secrets manager rather than .env?

Integration Approach

Stack fit: Best fit is a Laravel 9–13 monolith or modular monolith already using notifications for transactional and lifecycle messaging. The channel is stateless and configuration-driven, so it introduces no schema changes and no new infrastructure — only outbound HTTPS calls from queue workers. Teams on multi-tenant or multi-brand setups should note the config is effectively single-profile by default; per-message setProfileId()/setAccessToken() overrides make multi-profile possible, but credential resolution then becomes application logic we own.

Migration path: There is nothing to migrate. This is additive: add the package, add the instagram block to config/services.php, store credentials per environment, add an instagram_id column (or equivalent) to the notifiable, implement routeNotificationForInstagram(), and opt notifications in one at a time via via(). Existing email/SMS/push channels are untouched, which makes rollback a one-line change per notification class.

Compatibility: Verify three things explicitly rather than assuming: (a) the Laravel and PHP versions in use versus the package’s supported matrix; (b) Guzzle/HTTP client version alignment with the rest of the app, and whether the package uses Laravel’s HTTP client or Guzzle directly so global HTTP middleware (logging, retries, proxy) applies; (c) the default Graph API version (22.0) against Meta’s current version and deprecation schedule. Also confirm the Artisan command works in the deployment model — no interactive prompts, correct config caching — and that InstagramMessage serializes cleanly for queued notifications.

Sequencing:

  1. Spike: create a Meta app and Instagram professional account, obtain a token, and send one message to an internal tester in sandbox/dev.
  2. Add the package and config in non-production; implement routeNotificationForInstagram() on a test notifiable.
  3. Build one low-risk notification (internal alert or opt-in promotional) behind a feature flag; queue it; add logging of raw API responses and failure handling.
  4. Establish a token rotation runbook and secrets management; add monitoring for failures and rate limits.
  5. Expand to additional notification types after observing deliverability and Meta policy compliance.
  6. Only then consider product-facing use cases; do not promise inbound conversation handling.

Operational Impact

Maintenance: Single maintainer, low activity, small codebase. Pin the version and monitor the changelog and upstream repo. Consider forking or vendoring if the channel becomes critical. Budget for periodic compatibility checks with Laravel and Graph API versions. The package’s small surface area makes forking feasible.

Support: No vendor support; community-only via GitHub issues. Internal team must own Meta app review, permissions, token lifecycle, and policy compliance. TPM should assign an owner for the Meta developer account and token rotation.

Scaling: Outbound only; scales with queue workers and Meta API rate limits. The Instagram Messaging API has per-profile rate limits and messaging-window constraints. Need queue throttling, backoff, and possibly multiple profiles/tokens for volume. No built-in batching; attachMany may amplify calls. Monitor 429s and error rates. For high volume, consider a central notification service or direct API integration to control payloads and retries.

Failure modes:

  • Auth failure (expired/revoked token) → all notifications fail; need alerting and rotation.
  • Policy rejection (outside 24-hour window, missing message tag, user has not opted in) → notification dropped; need fallback channel (email/SMS) and user preference handling.
  • API version deprecation → package calls fail until updated.
  • Media URL inaccessible or oversized → attachment fails; validate client-side and host media publicly.
  • Invalid button payload (too many buttons, bad type) → send-time error; validate in code.
  • Rate limit exceeded → 429; need retry with backoff and dead-letter queue.
  • Silent failure if the package catches exceptions; ensure failures are logged and jobs retried.
  • No delivery receipts; cannot confirm read; rely on API acceptance only.

Ramp-up: Low for Laravel developers: familiar notification pattern, fluent message builder, README adequate for basic use. Moderate for Meta platform: requires understanding the Instagram Messaging API, permissions, app review, token types, and messaging policies. Plan for a 1–2 day spike for a developer familiar with Laravel but new to Meta, plus time for app review (days to weeks) if production access is needed. Documentation is README-only; no inline API docs or visible tests. Onboarding should include a runbook for credentials and failure handling.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package