What We’re Building
A FastAPI app that:- Accepts action calls from Orceum (
create_task,list_tasks,delete_task) - Receives an API key per user (injected automatically by Orceum)
- Sends lifecycle webhook events on install/uninstall
- Pushes a webhook event when a background job completes
Step 1: Plan Your App
Before writing code, define the actions your app will support:| Action | Description | Parameters |
|---|---|---|
create_task | Create a new task | title (required), due_date, priority |
list_tasks | List the user’s tasks | status filter, limit |
delete_task | Delete a task by ID | task_id (required) |
Step 2: Build Your App
Step 3: Handle Lifecycle Webhooks
Step 4: Testing Locally (Optional)
If you are developing locally, Orceum won’t be able to reach yourlocalhost server. You can use a tool like ngrok to expose your local server to the internet.
https://a1b2c3d4.ngrok-free.app). Use this URL as your Endpoint URL and Webhook URL in the next step when registering your app.
Step 5: Register Your App
Go to the Orceum Developer Studio, click Create App, and select Native App.- Basic Info: Name it “Todo Manager” and provide a clear description.
- Endpoint URL: Enter your base URL (e.g.,
https://todo.yourapp.com). - Authentication: Select API Key. Set the Header Name to
Authorizationand the Prefix toBearer. - Manifest: Paste the following JSON to define your actions:
- Webhooks: Enter your
installation_webhook_url. Toggle Events Enabled on and copy your generated webhook secret (whs_...) from the dashboard. - Installation Guidance: Add hints for the user to find their API key (e.g., “Go to your Todo app account → Settings → API”).
orc_sk_... secret. Copy this into your backend immediately — it is only shown once and is required to verify signatures on lifecycle webhooks.
Step 6: Install and Test
- Navigate to your newly created app in the Orceum Store.
- Click Install.
- When prompted by the UI, enter your test API key (e.g.,
sk-myapikey123).
create_task on your app, receive the result, and respond: “Done — I’ve added ‘Review the Q4 budget’ to your list, due Friday.”
Checklist
- Action handler routes on
eventfield -
X-Orceum-Installation-Idextracted and used for user isolation - Lifecycle webhook handler signature verification implemented
-
orc_*secret stored in secrets manager - HTTPS on
base_urland webhook URLs - Test action calls manually before publishing