Activities

Register a Live Activity push token

iOS app calls this on every Activity.pushTokenUpdates emission. The backend stores the token, keyed by (user, post_id_hash, push_token), and uses it to send apns-push-type: liveactivity updates as platforms complete. Idempotent — re-posting the same triple bumps the TTL. Tokens auto-expire after 1 hour of inactivity (or when the publish completes and the dispatcher sends a final update).

post/activities/register

Request

  • Base URL: https://www.sociahive.com/api/v1
  • URL: https://www.sociahive.com/api/v1/activities/register
  • Auth: one of:
    • API key in header X-API-Key
    • OAuth 2 (authorization code, authorization URL /api/oauth/authorize, token URL /api/oauth/token, scopes: activities:write)

Request body

push_tokenstring required

ActivityKit push token for a single in-flight Live Activity. Hex-encoded. Treated as a credential — never echoed back. Apple emits one per Activity.request(pushType:.token); mobile clients POST it as soon as pushTokenUpdates fires.

post_id_hashstring required

SHA-256 prefix of the post ID, matching PostPublishingAttributes.postIdHash on the iOS client. Backend dispatcher uses this as the key when fanning out platform-completion pushes.

apns_environment'production' | 'sandbox'

Set to "sandbox" for dev/TestFlight builds. Defaults to "production".

bundle_idstring required

The Live Activity widget extension bundle ID. Used as apns-topic: <bundle-id>.push-type.liveactivity when sending updates. MUST match the extension target on the device.

Example request

{
  "push_token": "a1b2c3d4e5f6...",
  "post_id_hash": "f3e1a8b2c7d0",
  "bundle_id": "com.sociahive.SociaHive.LiveActivityExtension"
}

Response

Live Activity registered

Example response

{
  "data": {
    "id": "507f1f77bcf86cd799439011"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.