মূল কন্টেন্টে যান
ডেভেলপার

ওয়েবহুক

কোনো পোস্ট লাইভ হওয়ামাত্র PostNimbo আপনার ঠিকানায় তা পাঠায়, যাতে Zapier, Make, n8n বা আপনার নিজের সার্ভার সেটি নিয়ে কাজ করতে পারে।

একটি সেট আপ করুন

  1. 1Settings > Webhooks খুলুন এবং একটি নাম ও একটি পাবলিক https ঠিকানা যোগ করুন।
  2. 2কোন চ্যানেলগুলোর জন্য তা বেছে নিন, অথবা সব চ্যানেলের জন্য কোনোটিই বাছবেন না।
  3. 3ইভেন্ট বেছে নিন: পাবলিশ হওয়া পোস্ট, ফ্লো-র সংগ্রহ করা লিড, শেষ হওয়া ফ্লো।
  4. 4আপনার ঠিকানায় একটি ইভেন্টের নমুনা পাঠাতে Send test event-এ ক্লিক করুন।

Zapier, Make ও n8n-এ

Zapier, Make ও n8n-এর PostNimbo অ্যাপ আপনার হয়ে সাবস্ক্রাইব করে: একটি ট্রিগার চালু করলে টুলটি যে ঠিকানায় শোনে তা দিয়ে POST /public/v1/webhooks কল হয়, আর বন্ধ করলে DELETE /public/v1/webhooks/:id কল হয়। আপনার নিজের কোডও একটি API কী দিয়ে একই কাজ করতে পারে।

Zapier, Make বা n8n সেট আপ করুন

কীভাবে ডেলিভারি হয়

  • JSON বডিসহ একটি POST, আর হেডারে ইভেন্টের নাম X-PostNimbo-Event.
  • পাবলিশ হওয়া পোস্টের উত্তর দিতে আপনার সার্ভারের হাতে 10 সেকেন্ড আর ফ্লো ইভেন্টের জন্য 5 সেকেন্ড। টাইমআউট, 429 বা 5xx উত্তরের পর ফ্লো ইভেন্ট আরও দুবার চেষ্টা করা হয়; পাবলিশ হওয়া পোস্ট আবার চেষ্টা করা হয় না। দ্রুত উত্তর দিন এবং কাজটা পরে করুন।
  • শুধু পাবলিক https ঠিকানা গ্রহণ করা হয়, আর রিডাইরেক্টও একটি পাবলিক ঠিকানাতেই যেতে হবে।
  • প্রতিটি ডেলিভারি ওয়েবহুক সেটিংসে দেখানো সিক্রেট দিয়ে সাইন করা থাকে, এই হেডারগুলোতে X-PostNimbo-Timestamp, X-PostNimbo-Signature.

ডেলিভারি আমাদের কাছ থেকেই এসেছে কিনা যাচাই করুন

আপনার সিক্রেট দিয়ে টাইমস্ট্যাম্প, একটি ফুল স্টপ ও র বডির HMAC-SHA256 হিসাব করুন, কনস্ট্যান্ট টাইমে সিগনেচার হেডারের সঙ্গে মেলান, এবং 5 মিনিটের বেশি পুরোনো টাইমস্ট্যাম্প প্রত্যাখ্যান করুন।

Node.js
const crypto = require('crypto');

// rawBody: the request body exactly as received, before JSON parsing
function fromPostNimbo(rawBody, headers, secret) {
  const timestamp = headers['x-postnimbo-timestamp'];
  const signature = headers['x-postnimbo-signature'] || '';
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  const expected =
    'sha256=' +
    crypto
      .createHmac('sha256', secret)
      .update(timestamp + '.' + rawBody)
      .digest('hex');
  return (
    signature.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
  );
}

ইভেন্ট

একই তালিকা GET /public/v1/webhooks/events-এ পাওয়া যায়, যাতে কোনো টুল ট্রিগার ও নমুনা ডেটা দেখাতে পারে।

post.published

A post went live on a channel. Sent once per channel, after the network accepted it, with the post in the array.

Webhooks with no channels get it for every channel; the others only for the channels they list.

পেলোড
[
  {
    "id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
    "content": "<p>Our autumn menu is here.</p>",
    "publishDate": "2026-10-26T09:30:00.000Z",
    "releaseURL": "https://www.linkedin.com/feed/update/urn:li:share:7000000000000000000",
    "state": "PUBLISHED",
    "integration": {
      "id": "c1d2e3f4-0000-4a00-8000-000000000001",
      "name": "Example Bakery",
      "providerIdentifier": "linkedin-page",
      "picture": "https://example.com/avatar.png",
      "type": "social"
    }
  }
]
post.scheduled

A post was queued to publish: scheduled (or published now), rescheduled, approved, or edited while scheduled. Sent once per channel, with the same fields as post.published. The next posts of a repeating post do not send it.

Webhooks with no channels get it for every channel; the others only for the channels they list.

পেলোড
[
  {
    "id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
    "content": "<p>Our autumn menu is here.</p>",
    "publishDate": "2026-10-26T09:30:00.000Z",
    "releaseURL": null,
    "state": "QUEUE",
    "integration": {
      "id": "c1d2e3f4-0000-4a00-8000-000000000001",
      "name": "Example Bakery",
      "providerIdentifier": "linkedin-page",
      "picture": "https://example.com/avatar.png",
      "type": "social"
    }
  }
]
post.failed

A post could not be published, or its publishing could not be confirmed, and is marked as failed. Sent once per channel, with the same fields as post.published (the reason is shown in PostNimbo).

Webhooks with no channels get it for every channel; the others only for the channels they list.

পেলোড
[
  {
    "id": "5b9c3f0e-6d0a-4a59-9b8e-2f1c7a4d2e11",
    "content": "<p>Our autumn menu is here.</p>",
    "publishDate": "2026-10-26T09:30:00.000Z",
    "releaseURL": null,
    "state": "ERROR",
    "integration": {
      "id": "c1d2e3f4-0000-4a00-8000-000000000001",
      "name": "Example Bakery",
      "providerIdentifier": "linkedin-page",
      "picture": "https://example.com/avatar.png",
      "type": "social"
    }
  }
]
lead.captured

An automation flow saved an email or phone number someone typed in answer to a question. Sent once per answer.

Webhooks with no channels get it for every channel's flows; the others only for the flows on the channels they list.

পেলোড
{
  "event": "lead.captured",
  "timestamp": "2026-10-26T09:30:00.000Z",
  "runId": "7d3f2a10-5c4e-4f8a-9a61-0e2b3c4d5e6f",
  "flow": {
    "id": "2a9e7c1b-3d4f-4e5a-8b6c-7d8e9f0a1b2c",
    "name": "Autumn menu giveaway"
  },
  "channel": {
    "id": "c1d2e3f4-0000-4a00-8000-000000000001",
    "network": "instagram",
    "name": "Example Bakery"
  },
  "contact": {
    "id": "4f5e6d7c-8b9a-4c0d-9e1f-2a3b4c5d6e7f",
    "name": "Sam Taylor",
    "username": "samtaylor",
    "email": "sam@example.com",
    "phone": "+447700900123",
    "tags": [
      "giveaway"
    ],
    "fields": {
      "postcode": "SW1A 1AA"
    }
  }
}
flow.completed

Someone reached the end of an automation flow. Sent once per run, with the same fields as lead.captured (email and phone are null when not collected).

Webhooks with no channels get it for every channel's flows; the others only for the flows on the channels they list.

পেলোড
{
  "event": "flow.completed",
  "timestamp": "2026-10-26T09:31:00.000Z",
  "runId": "7d3f2a10-5c4e-4f8a-9a61-0e2b3c4d5e6f",
  "flow": {
    "id": "2a9e7c1b-3d4f-4e5a-8b6c-7d8e9f0a1b2c",
    "name": "Autumn menu giveaway"
  },
  "channel": {
    "id": "c1d2e3f4-0000-4a00-8000-000000000001",
    "network": "instagram",
    "name": "Example Bakery"
  },
  "contact": {
    "id": "4f5e6d7c-8b9a-4c0d-9e1f-2a3b4c5d6e7f",
    "name": "Sam Taylor",
    "username": "samtaylor",
    "email": "sam@example.com",
    "phone": null,
    "tags": [
      "giveaway"
    ],
    "fields": {}
  }
}

PostNimbo দিয়ে কিছু বানাচ্ছেন?

আপনি কী বানাচ্ছেন আমাদের জানান। আমরা API নিয়ে সাহায্য করি, ডিরেক্টরির জন্য অ্যাপ রিভিউ করি এবং ইন্টিগ্রেশনের প্রয়োজনীয় এন্ডপয়েন্ট যোগ করি।