Accounts

User accounts API

Register new user

POST https://muni-portal-backend.openup.org.za/api/accounts/register/

Register new user

Request Body

Name
Type
Description

password_confirm

string

Password confirm

password

string

User password

username

string

User name (can be the same as email)

email

string

User email

{}

Verify registration

POST https://muni-portal-backend.openup.org.za/api/accounts/verify-registration/

Verify user email from the verification link

Request Body

Name
Type
Description

user_id

string

Django model user ID

signature

string

HMAC verification signature

timestamp

integer

User registration timestamp

{}

POST https://muni-portal-backend.openup.org.za/api/accounts/send-reset-password-link/

Send reset password link to the user by email

Request Body

Name
Type
Description

email

string

User email

Set new user password

POST https://muni-portal-backend.openup.org.za/api/accounts/reset-password/

Set new user password from the reset link

Request Body

Name
Type
Description

password

string

New user password

signature

string

HMAC verification signature

timestamp

integer

Reset password request timestamp

user_id

string

Django model user ID

{}

Login user

POST https://muni-portal-backend.openup.org.za/api/account/login/

Login user with username and password

Request Body

Name
Type
Description

password

string

User password

login

string

User name

{"token": "JWT.TOKEN"}

Logout user

POST https://muni-portal-backend.openup.org.za/api/accounts/logout/

Logout user from the system

Path Parameters

Name
Type
Description

revoke_token

boolean

Revoke current token

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

{}

Get user profile info

GET https://muni-portal-backend.openup.org.za/api/accounts/profile/

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

{
    "id": 1,
    "username": "test", 
    "first_name": "",
    "last_name": "", 
    "email": "test@test.com"
}

Update user profile info

POST https://muni-portal-backend.openup.org.za/api/accounts/profile/

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

Request Body

Name
Type
Description

email

string

Email to change

Last name

string

Lastname to change

first_name

string

Firstname to change

username

string

Username to change

{
    "id": 1,
    "username": "test", 
    "first_name": "",
    "last_name": "", 
    "email": "test@test.com"
}

Change user password

POST https://muni-portal-backend.openup.org.za/api/accounts/change-password/

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

Request Body

Name
Type
Description

password_confirm

string

New password confirmation

password

string

New password

old_password

string

Old password for security reasons

{}

Update user email

POST https://muni-portal-backend.openup.org.za/api/accounts/register-email/

Send a verification link to a user new email

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

Request Body

Name
Type
Description

email

string

New user email

{}

Verify new user email

POST https://muni-portal-backend.openup.org.za/api/account/verify-email/

Verify new user email from verification link

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

Request Body

Name
Type
Description

signature

string

HMAC request signature

timestam

string

Timestamp when user requested email change

email

string

New user email

user_id

string

Django model user ID

{}

User registration and verification

User login

Last updated