External: Mobile SDK

Create User Token

Changed on

Exchange app credentials or admin auth for user-scoped access token.

Supports two authentication methods:

  1. App credentials: Provide app_id and app_secret in the request body
  2. 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

app_idstring nullable
app_secretstring nullable

Response

Successful Response

access_tokenstring required
token_typestring
refresh_tokenstring nullable
expires_ininteger nullable
password_change'required' | 'recommended'

How the portal should ask a developer who signed in with the default password to change it.

Changes