Skip to content

Verify User's Email ​

Verifies a user’s email address. A verification email is sent upon registration with a link that must be clicked to confirm.

HTTP Request ​

GET /api/v1/auth/email/verify/:userId/{hash}

ParameterDescription
userId stringUnique identifier for the user
hash stringVerification hash received in the email link

Response ​

204 No Content

Indicates the email was verified successfully.

Frontend Integration ​

When the user clicks the verification link, they are redirected to your frontend. Your app should:

  1. Capture the url parameter from the query string.
  2. Make a GET request to that URL to verify the email.
  3. If the response is 204 No Content, inform the user of successful verification.
  4. Handle potential errors (403 Forbidden, 409 Conflict, 422 Unprocessable Content) — see below.
plaintext
https://brunago.sk/verify-email?url={verificationUrl}

Replace {verificationUrl} with the URL from the email.

Example Verification URL ​

plaintext
https://brunago.sk/verify-email?url=https%3A%2F%2Fapi.brunago.sk%2Fapi%2Fv1%2Fauth%2Femail%2Fverify%2F01J5X3Y8ZK2Q4R6T8V0W2X4Y6Z%2Fe05bdf9ce58ac6824eb37ec6ffc6c0d6a31a7901%3Fexpires%3D1715821904%26signature%3D20db38a62ea793d49a07cb04f330d028676a489e81bbb282e30c03c6596eb936
plaintext
https://brunago.sk/reset-password?token=2f6cb81e40a9f0d203cb60119022db8754444a9a9b02eef31adee79403dede3c&email=pavol.paska%40gmail.com

(You can customize /verify-email or /reset-password as needed.)

Error Handling ​

422 Unprocessable Content — the link does not match any user, or the hash is wrong:

json
{
  "message": "Overovací odkaz je neplatný."
}

409 Conflict — the address is already verified:

json
{
  "message": "E-mailová adresa je už overená."
}

403 Forbidden — the signature is invalid or the link has expired (links are valid for 60 minutes). Offer the user to resend the verification email.