Verify an email address (the link in the verification email)
POST
/verify-email
const url = 'http://localhost:4000/api/auth/verify-email?token=example';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({password: 'example'})};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'http://localhost:4000/api/auth/verify-email?token=example' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data password=exampleMarks the email verified only if the password matches the one the account was created with, so someone who signed up with your address cannot get in when you verify it. Limited to 20 tries per IP and 5 per account every 5 minutes.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”token
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/x-www-form-urlencoded
object
password
required
string
Example generated
password=exampleResponses
Section titled “Responses”Verified
Media typetext/html
Missing password, or the link is broken or expired
Media typetext/html
Wrong password
Media typetext/html
The password changed while verifying, or the account has no password
Media typetext/html
Too many tries
Media typetext/html
The password could not be checked; nothing changed
Media typetext/html