-
Notifications
You must be signed in to change notification settings - Fork 0
Registration
Vadim Sokoltsov edited this page Nov 13, 2016
·
2 revisions
Create new user
-
email- type:string- user's email -requered -
password- type:string- user's password -requered -
password_confirmation- type:string- confirmation for user's password -requered -
nick- type:string- nickname of user in system -requered -
authorization- type:json- object with information about user's client
authorization object should include fields:
-
platform- information about client's OS -
platform_version- version of client's OS -
app_name- name of the client (browser version, mobile app name, etc.) -
app_version- version of the client (browser version, mobile app name, etc.) -
provider- default:UProgress- name of the application through which authorization has been completed
- email -
can't be blank,is invalid,email already taken - password -
can't be blank,is too short (minimum is 6 characters) - password_confirmation -
Password confirmation doesn't match Password - nick -
can't be blank
-
token- encrypted authorization token
{
"user": {
"email": <user email>,
"password": <user password>,
"password_confirmation": <user password confirmation>,
"nick": <user nick>,
"authorization": {
"platform": "macOS",
"platform_version": "10.11",
"app": "Google Chrome",
"app_version": "56.14.3",
"provider": "UProgress"
}
}
}{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTA0OX0.B0X5T35HnHJ_2AxoKp6CeiTTq2n_lcoHc5X7hNGdFo0"
}{
"errors": {
"email": [
" email already taken"
]
}
}