Skip to main content

Username/Password/Phone Verification Code/Email Verification Code Login API

POST 

/auth/v1/signin

  • Username/password login, pass username, password;
  • Phone number verification code login, pass verification_token
  • Email verification code login, pass verification_token

Request

Query Parameters

    client_id string

    Client ID corresponding to the application, can be obtained from Cloud Development Platform -> Identity Authentication -> Development Settings. Defaults to environment ID, can be omitted

Header Parameters

    x-device-id string

    Device ID, the ID of the current logged-in device. The client should generate it randomly and cache it on the client. This parameter is related to the number of logged-in accounts.

Body

    username Username (string)

    Required when logging in with username and password. 2-48 characters, supports English uppercase and lowercase letters, numbers, special characters (only -_.:+ @), does not support Chinese

    password Password (string)

    Required when logging in with username and password

    verification_token Verification code token (string)

    Required when logging in with verification code. When logging in with phone verification code, the verification code token returned after verification

Responses

Response Headers
    Schema
      token_type Access token type (string)

      Uniformly return Bearer

      access_token User's access token (string)

      Token used to access Cloud Development HTTP API, length within 4096 bits

      refresh_token User's refresh token (string)

      access_token can be refreshed to get a new access_token when it expires through refresh_token, expiration time defaults to 31 days. Length within 128 bits

      expires_in int32

      Expiration time of access_token, in seconds

      scope Authorization scope (string)
      sub User's unique ID (string)
      groups string[]
    Loading...