Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solutionDOCS

      Authentication Initiation

      Use this interface to verify the user's identity with an OTP (one time password). With this interface, merchants are provided with various types of OTP and the OTP can be sent to the user through the specified message channel. 

      Request parameters

      authenticationTypeEnum(16)Required

      Indicates the authentication type. Possible value is:

      • OTP: One-time password
      authenticationRequestIdString(64)Required
      The unique ID of an authentication generated by merchants.
      authenticationChannelTypeEnum(16)Required

      Indicates the authentication channel type. Possible values are: 

      • EMAIL: Email 
      • SMS: Message
      userIdentityTypeEnum(16)Required

      Indicates the user identity type. Possibe value is: 

      • WALLET_TOKEN: Wallet access token
      userIdentityValueString(128)Required
      User identity value

      Response parameters

      resultResultRequired

      The request result, which contains information related to the request result, such as status and error codes.

      resultCodeString(16)Required
      Result code
      resultStatusEnumRequired

      Result status. Possible values are:   

      • S: Indicates that the result status is successful. 
      • F: Indicates that the result status is failed. 
      • U: Indicates that the result status is unknown.
      resultMessageString(64)Optional
      Result message
      authenticationRequestIdString(64)Optional
      The unique ID of an authentication generated by merchants.

      Result/Error codes

      CodeValueMessage
      SUCCESSSSuccess
      PARAM_ILLEGALFIllegal parameters exist. For example, a non-numeric input, or an invalid date.
      PROCESS_FAILFA general business failure occurred. Do not retry.
      KEY_NOT_FOUNDFThe key is not found.
      API_INVALIDFAPI is invalid or not active.
      CLIENT_INVALIDFThe client is invalid.
      SIGNATURE_INVALIDFThe signature is invalid.
      REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.
      ACCESS_DENIEDFAccess denied
      USER_NOT_EXISTFThe user does not exist.
      USER_STATUS_ABNORMALFThe user status is abnormal.
      SEND_TIMES_EXCEED_LIMITFSending limit exceeds.
      METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTP method.
      INVALID_ACCESS_TOKENFThe access token is invalid.
      Request/Response Code

      Request

      Method

      POST

      Endpoint

      v1/users/initAuthentication

      Header

      Accept: application/json

      URL

      Domain name

      Request Body
      Request parameters
      Response Body
      Body content