External: Mobile SDK
Create User Token
Changed onExchange 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
post/api/v1/users/{user_id}/token
Request
- Base URL: https://api.openwearables.io (the document declares no server; this is the origin it was published from)
- URL: https://api.openwearables.io/api/v1/users/{user_id}/token
- Auth: OAuth 2 (password, token URL /api/v1/auth/login)
Path parameters
user_idstring uuid required
Request body
Response
Successful Response
Changes
- info
added the optional property
to the response with the status
- info