From 9a5ea8104b779d62f2d05251aa3f7c0831e736eb Mon Sep 17 00:00:00 2001 From: Ali Hesari Date: Sun, 20 Sep 2026 01:25:59 +0200 Subject: [PATCH] docs(readme): point the inbox at the chat adapter and the webhook loop --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 137753d..98c2592 100644 --- a/README.md +++ b/README.md @@ -405,6 +405,22 @@ update, delete and duplicate on campaigns, ad sets and network ads, plus `bulkSe [`examples/CreatePost.java`](examples/CreatePost.java) creates a post against a running API. +## Chatbots and the inbox + +The [chat adapter](https://fopost.com/docs/sdks/chat-adapter) turns the FoPost inbox into one send/receive channel for a chatbot +framework. It ships in the TypeScript and Python SDKs. There is no dedicated adapter here and no +API change behind it, so the same loop is three pieces with this client: + +1. **Verify** the `inbox.message_received` webhook. The payload is ids only, on purpose, so + nothing a customer wrote sits in your logs. The [signing scheme](https://fopost.com/docs/webhooks/verification) + is HMAC-SHA256 over `{timestamp}.{body}`, refused past a five minute tolerance. +2. **Read** the item back with `client.inbox().list(InboxListParams.create()…)`, filtered to the payload's + `accountId` and matched on its `itemId`. +3. **Answer** with `client.inbox().reply(item.id(), text)`, or open a thread with + `client.inbox().startConversation(…)`. + +Reading needs the `inbox` scope; answering needs `publish` as well. + ## Contributing Issues and pull requests are welcome at [fopost/fopost-java](https://github.com/fopost/fopost-java).