Acquire access token

Request a new JWT access token based on a valid refresh token.

URI
/credential/accessToken/{refreshToken}
Method
GET

URI parameters

refreshToken
The refresh token

Request headers

Request body

Response body

200 The JWT access token
eyJhbGciO ... _K74HRzwg
403 The JWT refresh token is invalid

                            

Check access token

Check the validity of the access token that sent via headers.

URI
/credential/checkToken
Method
GET

URI parameters

Request headers

Authorization
Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The ID of the user in the access token
9425288f-e290-11e6-7f7f-7f7f7f7f7f7f
403 The provided JWT access token is invalid or expired

                            

Add a Firebase message token

Add a new Firebase message token to the user's messages token list.

URI
/credential/messageToken/{messageToken}
Method
GET

URI parameters

messageToken
The Firebase message token

Request headers

Authorization
Bearer eyJhbGciO ... _K74HRzwg

Request body

Response body

200 The ID of the user in the access token
9425288f-e290-11e6-7f7f-7f7f7f7f7f7f
403 The provided JWT access token is invalid or expired

                            

Password reset request

Send password reset request mail to the specified email address.

URI
/credential/passwordReset/{email}
Method
GET

URI parameters

email
The email address of the user

Request headers

Request body

Response body

200 The specified email address is found and the mail is sent
email@address.tld
404 The specified email address is not found

                            

Request a refresh token

Request a new refresh token with the specified user credentials.

URI
/credential/refreshToken/{email}/{password}
Method
GET

URI parameters

email
The email address of the user
password
The password of the user

Request headers

Request body

Response body

200 The refresh token of the user
eyJhbGciO ... _K74HRzwg
403 Credential mismatch

                            

Sign up

Sign up with the specified email and password credential.

URI
/credential/signUp/{email}/{password}
Method
GET

URI parameters

email
The email address of the user
password
The password of the user

Request headers

Request body

Response body

200 The ID of the user
9425288f-e290-11e6-7f7f-7f7f7f7f7f7f
302 The email address already signed up

                            

Verify email address

Verify the credential with the specified userId and salt.

URI
/credential/verify/{userId}/{code}
Method
GET

URI parameters

userId
The ID of the user
code
The code in the email body

Request headers

Request body

Response body

200 The ID of the user
9425288f-e290-11e6-7f7f-7f7f7f7f7f7f
403 Any verify error (user ID not exists, code mismatch, already verified user)