Create a new user and send an OTP token to the user's mobile. If the mobile number already exists, do not create a new user. Send an OTP code to the existing user's mobile and disregard any other signup params.
an OTP code will be sent via SMS to the user's mobile
an otp_auth_key
will be returned to the client
must begin with +8525, +8526, or +8529
must contain a further 7 digits.
+85251234567
+85261234567
+85291234567
+11112345678 - must begin with +8525, +8526, or +8529
+85212345678 - must begin with +8525, +8526, or +8529
+8525234567 - too short
+852523456789 - too long
To understand the registration process in detail please refer to the attached Registration flowcharts
Code | Description |
---|---|
422 | Validation Error |
500 | Internal Server Error |
POST /api/v1/auth/signup { "user_auth": { "mobile": "+85251224538", "first_name": "Jake", "last_name": "Deamon", "address_attributes": { "district_id": "1", "address_type": "Profile" } } } 200 { "otp_auth_key": "/JqONEgEjrZefDV3ZIQsNA==" }
Param name | Description |
---|---|
user_auth required |
Validations:
|
user_auth[mobile] optional |
Mobile number e.g. +85212345678 Validations:
|
user_auth[first_name] optional |
Given name (first name) Validations:
|
user_auth[last_name] optional |
Family name (last name) Validations:
|
user_auth[address_attributes] required |
Validations:
|
user_auth[address_attributes][district_id] optional |
Hong Kong district Validations:
|
user_auth[address_attributes][address_type] optional |
Type of address e.g. 'Profile' or 'Collection' Validations:
|