Verifies a user's email address using a signed URL sent via email.
signed (requires a valid signed URL)| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| user | int | Yes | User ID | 123 |
This endpoint is typically accessed via a signed URL sent in an email verification email. The URL is generated with a temporary signature that expires after 60 minutes.
GET /api/v1/auth/verify-email/123?signature=abc123&expires=1640995200
Returns a success message when email is verified.
{
"message": "Email verified successfully"
}
Returns a message if the email is already verified.
{
"message": "Email already verified"
}
| Status | Description | Example/Reference |
|---|---|---|
| 403 | Invalid or expired signature | { "message": "Invalid signature" } |
| 404 | User not found | Not found error |
User Registration/Update: When a user registers with an email or updates their email address, the UserObserver automatically sets email_verified_at to null and sends a verification email.
Email Sent: An email is sent to the user's email address containing a signed verification link that expires in 60 minutes.
User Clicks Link: User clicks the verification link in their email, which makes a GET request to this endpoint.
Email Verified: The endpoint validates the signed URL, checks if the email is not already verified, and sets email_verified_at to the current timestamp.
Success Response: User receives a success message confirming their email is verified.