Skip to content

API reference

Temporary tokens

POST /v1/auth/grant: short-lived streaming tokens.

POST /v1/auth/grant

POSThttps://api.shihab.co.uk/v1/auth/grant

Creates a temporary token (sht_...) that can open streams, for browsers and mobile apps. Requires a key with the stream scope. Guide: Temporary tokens.

  • ttl_secondsintegerOptionalDefault: 60
    Lifetime, 30 to 3600 seconds.
Parameter
curl https://api.shihab.co.uk/v1/auth/grant \
  -H "Authorization: Bearer $SHIHAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ttl_seconds": 60}'
200 OK
{
  "token": "sht_3kQ9vXr2...",
  "expires_at": "2026-10-12T12:01:00Z",
  "ttl_seconds": 60
}

Need help? Email [email protected] or message us on WhatsApp.