Authentications
Get Verification Code
Request a new email verification code for the authenticated user.
Endpoint
Request
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | Bearer token |
Content-Type | Yes | application/json |
Response
Success Response
Code: 200 OK
Content example:
Field | Type | Description |
---|---|---|
message | string | Confirmation that the verification code was sent |
Error Response
Code: 401 UNAUTHORIZED
Content example:
Notes
- The user must be authenticated (JWT required).
- A verification code is generated and sent to the user’s registered email.
Example Usage
JavaScript (Fetch API)
Security Considerations
- Use HTTPS to prevent interception of the token.
- Ensure the user is authenticated before generating the verification code.