outreply
Official Python SDK for the OutReply Developer API.
pip install outreply
Quick start
import os
from outreply import OutReply
client = OutReply(api_key=os.environ["OUTREPLY_API_KEY"])
# 1. Verify your key
me = client.account.retrieve()
print(f"Signed in as {me['email']}")
# 2. Schedule a post (idempotency-safe — retry freely)
post = client.posts.schedule(
page_id="65f...",
message="Launching tomorrow 🚀",
scheduled_at="2026-05-01T10:00:00Z",
)
# 2b. …or publish one right now.
live = client.posts.publish(
page_id="65f...",
message="We're live! 🎉",
media_urls=["https://cdn.example.com/hero.jpg"],
)
print(live["platform_post_id"])
# 3. Subscribe to real-time events
hook = client.webhooks.create(
url="https://example.com/webhooks/outreply",
events=["post.published", "post.failed"],
)
print("Store this secret — it's shown only once:", hook["secret"])
Features
- 🔐 Bearer-token auth. Supports scoped keys and sandbox tokens.
- 🔁 Automatic
Idempotency-Keyon every mutating call. - 🪝 Built-in webhook signature verifier.
- ⏱ Exponential-backoff retries that respect
Retry-After. - 🧯 Typed exceptions mapped 1:1 with the error catalog.
- 🧭 Full type hints. Works on Python 3.9+.
Resources
| Namespace | Methods |
|---|---|
client.account |
retrieve() |
client.brands |
list() |
client.pages |
list(brand_id=..., platform=...) |
client.posts |
schedule(), list_scheduled(), retrieve_scheduled(), cancel_scheduled(), list_published() |
client.comments |
list(), reply() |
client.media |
upload(), list(), retrieve(), delete() |
client.webhooks |
list(), retrieve(), create(), delete() |
Webhook verification (Flask)
from flask import Flask, request, abort
from outreply import construct_event
app = Flask(__name__)
@app.post("/webhooks/outreply")
def outreply_webhook():
try:
event = construct_event(
payload=request.get_data(), # raw bytes — NOT request.json
header=request.headers.get("X-OutReply-Signature"),
secret=os.environ["OUTREPLY_WEBHOOK_SECRET"],
timestamp_header=request.headers.get("X-OutReply-Timestamp"),
tolerance_sec=300,
)
except ValueError:
abort(400)
print("Received:", event["type"], event["data"])
return "", 200
The verifier is dual-signature aware — it accepts comma-separated signatures so your receiver keeps accepting traffic during a 24-hour secret-rotation grace window.
Error handling
from outreply import (
OutReply,
OutReplyRateLimitError,
OutReplyValidationError,
OutReplyQuotaError,
)
try:
client.posts.schedule(page_id="...", message="...", scheduled_at="...")
except OutReplyValidationError as err:
print("Bad input:", err.details)
except OutReplyRateLimitError as err:
print(f"Slow down — retry in {err.retry_after_sec}s")
except OutReplyQuotaError:
print("Daily quota exceeded. Upgrade your plan.")
Configuration
client = OutReply(
api_key=os.environ["OUTREPLY_API_KEY"],
timeout=30.0,
max_retries=2, # 3 attempts total
default_headers={"X-Tenant": "acme-co"},
)
License
MIT © OutReply
Metadata
Release files for outreply 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| outreply-1.1.0.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| outreply-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / outreply-1.1.0.tar.gz
| Download URL | outreply-1.1.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97fc28c63c7c6e299ba25b8600fc6666d7a25cd509131d41ae2f2d2489425a49
|
|
BLAKE2b-256 checksum How to use checksums |
4b76dbf58a0f93ec74130f1e8ab2a30208d4558f757eaa311f8ed5b1dcaf64bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / outreply-1.1.0-py3-none-any.whl
| Download URL | outreply-1.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e58a6c68bed04d6576646ada7b4e5605ca997c86804c7b948f8a260d70e55bc7
|
|
BLAKE2b-256 checksum How to use checksums |
a365a5e60ecec71a2def1e4f06b8e6ffabb88630bc009877d8c2671936040d43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency log