Create User Token
Exchange app credentials or admin auth for user-scoped access token.
Supports two authentication methods:
- App credentials: Provide app_id and app_secret in the request body
- Admin authentication: Authenticate as a developer/admin via Bearer token (app_id and app_secret can be omitted)
Both methods return access_token with refresh_token.
Returns a JWT token scoped to SDK endpoints only. Tokens expire after configured time (default: 60 minutes).
Args: user_id: OpenWearables User ID (UUID) payload: Optional application credentials (app_id, app_secret) db: Database session developer: Optional authenticated developer (from Bearer token)
Returns: TokenResponse containing access_token, token_type, and refresh_token
Raises: 401: If app credentials are invalid or admin auth is missing 400: If neither app credentials nor admin auth is provided
Documentation Index
Fetch the complete documentation index at: https://openwearables.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.

