I'll number all functions and then provide detailed parameters for each endpoint. Let me organize them systematically:
USER MANAGEMENT FUNCTIONS:
Registration & Authentication:
1.1. create-account
1.2. auth
1.3. social-login
1.4. logout
1.5. forgot-password
1.6. reset-password
1.7. email-activation
Profile Management:
2.1. get-user-data
2.2. update-user-data
2.3. delete-user-account
2.4. update-profile-picture
2.5. update-cover-picture
2.6. get-user-albums
2.7. set-privacy
Settings & Verification:
3.1. two-factor
3.2. verify-user
3.3. get-settings
3.4. update-settings
3.5. update-email
3.6. update-phone
3.7. block-user
Session Management:
4.1. check-token
4.2. refresh-token
4.3. delete-tokens
4.4. get-sessions
4.5. delete-session
Now, let's detail the parameters for each endpoint:
DETAILED PARAMETERS:
1.1. create-account
Endpoint: /api/create-account
Method: POST
Required Parameters:
- username: string (unique username)
- password: string
- email: string (valid email)
- confirm_password: string
- server_key: string
Optional Parameters:
- first_name: string
- last_name: string
- gender: string ('male' or 'female')
- phone_number: string
1.2. auth
Endpoint: /api/auth
Method: POST
Required Parameters:
- username: string (or email)
- password: string
- server_key: string
Response:
- access_token: string
- user_id: integer
1.3. social-login
Endpoint: /api/social-login
Method: POST
Required Parameters:
- provider: string ('facebook', 'google', 'twitter')
- access_token: string (from social provider)
- server_key: string
1.4. logout
Endpoint: /api/logout
Method: POST
Required Parameters:
- access_token: string
- server_key: string
1.5. forgot-password
Endpoint: /api/forgot-password
Method: POST
Required Parameters:
- email: string
- server_key: string
1.6. reset-password
Endpoint: /api/reset-password
Method: POST
Required Parameters:
- code: string (received via email)
- password: string
- server_key: string
2.1. get-user-data
Endpoint: /api/get-user-data
Method: GET
Required Parameters:
- access_token: string
- server_key: string
Optional Parameters:
- user_id: integer (for viewing other profiles)
- fetch: string ('user_data', 'followers', 'following')
2.2. update-user-data
Endpoint: /api/update-user-data
Method: POST
Required Parameters:
- access_token: string
- server_key: string
Optional Parameters:
- first_name: string
- last_name: string
- gender: string
- birthday: string (YYYY-MM-DD)
- about: string
- location: string
- phone_number: string
- website: string
2.4. update-profile-picture
Endpoint: /api/update-user-data
Method: POST
Required Parameters:
- access_token: string
- server_key: string
- avatar: file (image file)
3.1. two-factor
Endpoint: /api/two-factor
Method: POST
Required Parameters:
- access_token: string
- server_key: string
- type: string ('enable', 'disable', 'verify')
- code: string (required for verification)
3.7. block-user
Endpoint: /api/block-user
Method: POST
Required Parameters:
- access_token: string
- server_key: string
- user_id: integer (user to block/unblock)
- block_action: string ('block' or 'unblock')
4.1. check-token
Endpoint: /api/check-token
Method: GET
Required Parameters:
- access_token: string
- server_key: string
Would you like me to:
- Provide details for any other specific endpoints?
- Show example API responses?
- Provide implementation examples in PHP?
- Explain the authentication flow between these endpoints?