loginByEmailVerification

Login By Email Verification - exchanges the 6-digit code emailed by sendLoginCodeEmail for a bearer token.

Use with an AI agent

Export this page as Markdown or bundle it with a task for your agent.

Try a task
Preview the prompt that will be copied

Reference

Authentication: not required

Login By Email Verification - exchanges the 6-digit code emailed by sendLoginCodeEmail for a bearer token.

Authentication: Not required

Parameters:
- email (string, required): The address the code was sent to
- code (string, required): The 6-digit code from the email
- authenticationMethod (string, required): EMAIL_CODE

Behavior:
- Succeeds only if the code matches and has not expired
- Each code accepts at most 5 attempts, including the successful one. After that it is locked and a new code must be requested
- A code can be used once
- An unknown email and a wrong, used, or locked code all return "invalid code"
- Requests are rate limited per client IP and per email
- Issues an opaque bearer token on success. Send it as 'Authorization: Bearer <token>' on methods that require authentication

Returns:
- { token: string, userId: string }

Example:
{
  "method": "loginByEmailVerification",
  "params": {
    "email": "YOUR_EMAIL_ADDRESS",
    "code": "123456",
    "authenticationMethod": "EMAIL_CODE"
  }
}