Authentications
Verify Email
Verify the email using the provided verification code.
Endpoint
Request
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | Bearer token |
Content-Type | Yes | application/json |
Body
Field | Type | Required | Description |
---|---|---|---|
code | string | Yes | Verification code |
Response
Success Response
Code: 200 OK
Content example:
Field | Type | Description |
---|---|---|
message | string | Confirmation of email verification |
Error Response
Code: 400 BAD REQUEST
Content example:
Notes
- The user must be authenticated (JWT required).
- The provided verification code should match the code sent to the user’s email.
- Once verified, the user’s email will be marked as verified.
Example Usage
JavaScript (Fetch API)
Security Considerations
- Use HTTPS to prevent interception of the token and code.
- Ensure the code is valid and not expired before verification.