Email a sign-in code
POST
/v1/auth/2fa/challenge/email
const url = 'https://api.emite.cr/v1/auth/2fa/challenge/email';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"challengeToken":"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 https://api.emite.cr/v1/auth/2fa/challenge/email \ --header 'Content-Type: application/json' \ --data '{ "challengeToken": "example" }'(Re)sends a 6-digit sign-in code to the account email for a live challenge: the backup path, available whatever methods the account has, including an authenticator alone. Use the code as code in POST /v1/auth/2fa/challenge/verify. Limited per email: at most one code every 60 seconds (429 EMAIL_VERIFICATION_COOLDOWN). 400 MFA_CHALLENGE_EXPIRED for an unknown, used or expired challenge; 503 EMAIL_DELIVERY_FAILED when the email could not be sent. At most 10 requests per minute per client IP (429 AUTH_RATE_LIMITED).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
challengeToken
required
Challenge token returned by the login response.
string
Examplegenerated
{ "challengeToken": "example"}Responses
Section titled “Responses”The code was sent. The response has no body.