📕
[ARCHIVED] Cape Agulhas App
  • Home
  • User guide
    • Installation
    • User accounts and service requests
    • Supported devices
    • Troubleshooting
    • How do I reset notification preferences?
    • Enable Notifications from Settings Page
  • Administrator guide
    • Managing content
    • Pages
      • Councillors
      • Services
    • Snippets
    • Notices and Notifications
    • Important Contacts
    • Icons
    • App Environments
    • Administrator accounts
  • API
    • Overview
    • Web hooks
    • Web push
    • Accounts
    • User authentication (JWT Token)
    • Service Requests
  • Development
  • Software Development
  • Architectural Decision Records
    • ADR01: Single page app vs server-side templating
    • ADR02: custom web push backend or which service
  • Collaborator Service Requests Integration
  • Deployment
  • Design System and Component Library
    • Webflow exports & changelog
    • Component library
    • Link Blocks
    • Form Elements
    • Grids
Powered by GitBook
On this page
  • Register new user
  • Verify registration
  • Retrieve reset password link
  • Set new user password
  • Login user
  • Logout user
  • Get user profile info
  • Update user profile info
  • Change user password
  • Update user email
  • Verify new user email
  • User registration and verification
  • User login

Was this helpful?

  1. API

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

{}
{"field_name": "Error description"}

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

{}

Retrieve reset password link

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

{}
{"field_name": "Error description"}

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

PreviousWeb pushNextUser authentication (JWT Token)

Last updated 4 years ago

Was this helpful?