Signup with PWD
Sign up using with a Password (PWD).
HTTP Request
POST/api/users/auth/pwd/signup
Authorization
Authorization
- Required: No
- Permission: None
- Authentication: None
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| username | String | Yes | User's username |
| password1 | String | Yes | User's password |
| password2 | String | Yes | Confirm user's password |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3api = requests.Session()
4response = api.post(
5 'http://www.example.com/api/users/auth/pwd/signup/',
6 json={
7 "username": "johndoe",
8 "password1": "password123",
9 "password2": "password123"
10 }
11)1curl "http://www.example.com/api/users/auth/pwd/signup/" -X POST -H "Content-Type: application/json" -d '{
2 "username": "johndoe",
3 "password1": "password123",
4 "password2": "password123"
5}'Status Codes
| Code | Description |
|---|---|
| 200 | User registered successfully |
| 400 | Invalid input |
| 400 | Required fields missing |
Response Fields
| Field | Type | Description |
|---|---|---|
| None | None | No content |
Notes
- The
password1andpassword2fields must match. - The
usernamemust be unique and not already taken by another user. - The response will be empty on success, indicating that the user account has been created successfully.