Confirm the WhatsApp verification code
POST
/v1/auth/me/whatsapp/verify
const url = 'https://api.emite.cr/v1/auth/me/whatsapp/verify';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"123456"}'};
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/me/whatsapp/verify \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "123456" }'Confirms the code sent by POST /v1/auth/me/whatsapp: the number is then linked to the person, in the company it was linked from, and an email tells the person. 404 WHATSAPP_LINK_NOT_FOUND without a link. 400 WHATSAPP_OTP_NOT_PENDING when no code is waiting, WHATSAPP_OTP_EXPIRED after its 10 minutes, WHATSAPP_OTP_INVALID for a wrong code and WHATSAPP_OTP_TOO_MANY_ATTEMPTS after five wrong ones (request a new code). 409 WHATSAPP_PHONE_ALREADY_LINKED when another person verified the number first. For a person’s session (JWT) only: an API key answers 403.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
6-digit code received over WhatsApp
string
Example
123456