Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Xiaomi Open Authentication API
description: The Xiaomi Open API provides OAuth 2.0 based access to Xiaomi user account data including profile information, contact details, friend lists, and identity verification. Third-party applications can integrate Xiaomi account login and access authorized user data via scope-based permissions.
version: 1.0.0
contact:
name: Xiaomi Developer Support
url: https://dev.mi.com
termsOfService: https://dev.mi.com/docs/passport/en/
servers:
- url: https://open.account.xiaomi.com
description: Xiaomi Open Account API
security:
- oauth2: []
tags:
- name: Authentication
paths:
/checkPassword:
get:
operationId: checkUserPassword
summary: Verify User Password
description: Triggers a password verification flow for the specified Xiaomi user. Sends a callback to the provided HTTPS URL with the verification result and authorization code.
tags:
- Authentication
parameters:
- name: clientId
in: query
required: true
description: The allocated application client ID.
schema:
type: integer
format: int64
- name: xmUserId
in: query
required: true
description: The Xiaomi user ID to verify.
schema:
type: integer
format: int64
- name: callback
in: query
required: true
description: HTTPS callback URL for receiving the verification result.
schema:
type: string
format: uri
responses:
'200':
description: Password check initiated. Result sent to callback URL.
'400':
description: Bad request. Invalid parameters.
components:
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://account.xiaomi.com/oauth2/authorize
tokenUrl: https://account.xiaomi.com/oauth2/token
scopes:
'1': Access user profile (nickname, ID, avatar)
'2': Access user friend list (MiChat)
'3': Access user OpenID
'4': Access user phone number
'6': Access user email address