Authentication#
User Registration#
requests |
info |
|---|---|
endpoint |
|
method |
|
Authorization |
none |
desc |
the userType param is used to determine whether the registration is for coach or normal user |
payload:
key |
type |
remarks |
|---|---|---|
String |
required |
|
password1 |
String |
required |
password2 |
String |
required |
username |
String |
required |
userType |
Integer |
0: user (default), |
Custom Confirm Email Address#
requests |
info |
|---|---|
endpoint |
|
method |
|
Authorization |
none |
desc |
perform email confirmation by input verification key string instead of by clicking the confirmation link |
payload:
key |
type |
remarks |
|---|---|---|
key |
String |
required |
Login#
requests |
info |
|---|---|
endpoint |
|
method |
|
Authorization |
none |
desc |
a token will be return for authorization |
payload:
key |
type |
remarks |
|---|---|---|
String |
required |
|
password1 |
String |
required |
password2 |
String |
required |
username |
String |
required |
userType |
Integer |
0: user (default), |
Request Password Reset#
requests |
info |
|---|---|
endpoint |
|
method |
|
Authorization |
none |
desc |
a confirmation email will be sent to the registered email |
payload:
key |
type |
remarks |
|---|---|---|
String |
required |
Confirm Password Reset#
requests |
info |
|---|---|
endpoint |
|
method |
|
Authorization |
none |
desc |
submit the new password together with the uidb64-token string received from the reset email |
payload:
key |
type |
remarks |
|---|---|---|
password1 |
String |
required |
password2 |
String |
required |
uid |
String |
required |
token |
String |
required |
Change Password#
requests |
info |
|---|---|
endpoint |
|
method |
|
Authorization |
required |
desc |
- |
payload:
key |
type |
remarks |
|---|---|---|
new_password1 |
String |
required |
new_password2 |
String |
required |
Get Self Info (User)#
requests |
info |
|---|---|
endpoint |
|
method |
|
Authorization |
required |
desc |
return a user object |
payload:
key |
type |
remarks |
|---|---|---|
- |
- |
- |
response:
{
"pk": Integer,
"username": String,
"email": String,
"approved": Boolean,
"group": {
"id": Integer,
"name": String,
"permissions": []
},
"avatar": String
}
Social Auth (Facebook)#
requests
info
endpoint
/registration/facebook/method
POSTAuthorization
none
desc
-
payload:
key
type
remarks
access_token
String
required
code
String
required