npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@redonvn/messaging-instagram

v1.0.0

Published

Enterprise Instagram Messaging & Conversations SDK (Meta Graph API v21.0) with X-Hub-Signature-256 & IMessagingProvider facade

Readme

@redai/messaging-instagram — Enterprise Instagram Messaging & Conversation SDK

Bộ SDK TypeScript toàn diện cho Instagram Messaging API (Messenger Platform for Instagram / Meta Graph API v21.0+), được thiết kế theo chuẩn kiến trúc Speakeasy 4 tầng, bao phủ 100% các API chính thức của Meta để tích hợp trực tiếp vào nền tảng RedAI OmniChannel.


1. Bản Đồ Toàn Bộ 6 Phân Hệ API (100% Coverage)

| Sub-Resource | Thuộc tính trên Client | Các API & Nghiệp vụ bao phủ | | :--- | :--- | :--- | | InstagramMessagesResource | client.messages | • sendText: Gửi văn bản, Quick Replies (tối đa 13 nút), Inline Reply-To (mid), thẻ HUMAN_AGENT (mở rộng cửa sổ 24h lên 7 ngày)• sendMediaByUrl / sendMediaByAttachmentId: Gửi Image, Video, Audio, File• uploadReusableAttachment: Tải trước Media lên máy chủ Meta (POST /{node}/message_attachments)• sendHeartSticker: Gửi nhãn dán Trái tim (like_heart)• sendMediaShare: Chia sẻ bài viết / Reel vào DM (MEDIA_SHARE)• sendGenericTemplate: Gửi Carousel trượt ngang tối đa 10 thẻ sản phẩm/dịch vụ• sendButtonTemplate: Gửi văn bản kèm tối đa 3 nút bấm (web_url / postback)• sendProductTemplate: Gửi thẻ sản phẩm trực tiếp từ Meta Commerce Catalog• sendPrivateReplyToComment / sendPrivateReplyToPost: Tự động inbox DM cho khách bình luận bài viết/Reels/Live (hợp lệ trong 7 ngày)• sendSenderAction: mark_seen, typing_on, typing_off• reactToMessage / unreactToMessage: Thả/gỡ cảm xúc (love, ❤️...) vào tin nhắn | | InstagramConversationsResource | client.conversations | • listConversations: Lấy danh sách cuộc hội thoại (GET /{node}/conversations?platform=instagram)• findConversationByUser: Tìm nhanh cuộc hội thoại theo user_id (IGSID)• getConversationById: Lấy chi tiết hội thoại & người tham gia• getConversationMessages: Lấy lịch sử tin nhắn phân trang (GET /{conv-id}/messages)• getMessageById: Tra cứu chi tiết 1 tin nhắn đơn lẻ (GET /{message-id}) | | InstagramProfilesResource | client.profiles | • getUserProfile: Tra cứu hồ sơ khách hàng theo IGSID (name, username, profile_pic, follower_count, is_user_follow_business, is_business_follow_user, is_verified_user)• getMessengerProfile: Đọc cấu hình ice_breakers & persistent_menu• setIceBreakers: Cài đặt tối đa 4 câu hỏi gợi ý khi mở hộp thư mới• setPersistentMenu: Cài đặt menu cố định trong khung chat• deleteMessengerProfile: Xóa cấu hình ice_breakers / persistent_menu | | InstagramHandoverResource | client.handover | • passThreadControl: Bàn giao hội thoại từ AI Chatbot sang Livechat / Meta Page Inbox (263902037430900)• takeThreadControl: Thu hồi quyền điều khiển về lại AI Chatbot (Primary Receiver)• requestThreadControl: Yêu cầu cấp quyền điều khiển từ Secondary Receiver• getThreadOwner: Kiểm tra ứng dụng nào đang giữ quyền điều khiển luồng chat• listSecondaryReceivers: Liệt kê các ứng dụng phụ đã kết nối | | InstagramSubscriptionsResource | client.subscriptions | • subscribeWebhookFields: Đăng ký nhận Webhook (messages, messaging_postbacks, messaging_seen, messaging_handovers, messaging_referral, message_reactions, standby)• listSubscribedApps: Kiểm tra danh sách app đang đăng ký• unsubscribeWebhook: Hủy đăng ký Webhook | | InstagramWebhookResource | client.webhook | • verifyChallenge: Xác thực GET hub.challenge• verifyAndParseAll: Kiểm tra chữ ký X-Hub-Signature-256 (timingSafeEqual) và bóc tách 10 loại sự kiện (Text, Media, Story Mention, Story Reply, Quick Reply, Postback, Reaction, Read/Delivery, Click-to-Direct Ads Referral, Handover, Standby)• verifyAndParse: Chuẩn hóa sang WebhookMessageEventResult của IMessagingProvider |


2. Hỗ Trợ 2 Chế Độ Xác Thực Của Meta (authMode)

  1. facebook_graph (Mặc định):
    • Domain: https://graph.facebook.com/v21.0
    • Dành cho ứng dụng sử dụng Facebook Login for Business (Page Access Token gắn với Facebook Page liên kết Instagram Professional Account).
  2. instagram_graph:
    • Domain: https://graph.instagram.com/v21.0
    • Dành cho ứng dụng sử dụng Instagram Business Login (Instagram User Access Token trực tiếp không cần qua Facebook Page).