Account Activation - MarcoLagalla/marette_backend GitHub Wiki
Name | Account activation |
---|---|
Description | Verify user's email sending a token |
URL | api/v1/account/activate/<int:id> /<str:token> |
Allowed methods | GET |
Authorizations | AllowAny |
-
<int:id>
is the user's id as returned by [UserProfile] (https://github.com/MarcoLagalla/marette_backend/wiki/UserProfile) -
<str:token>
activation token to be compared with the db
Confirms user's email with the given token.
Set the flag is_active=True
in user.
Field | Type | Required | Unique | Comments |
---|---|---|---|---|
id |
numeric | yes | yes | |
tokn |
string | yes | yes |
HTTP_200_OK
{
"activation": "email has been confirmed"
}
HTTP_401_UNAUTHORIZED
, HTTP_400_BAD_REQUEST
If the Auth Token is invalid.
{
"activation": "invalid token"
}
HTTP_204_NO_CONTENT
If email has already been confirmed
{
"activation": "user has already confirmed the email"
}