Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1006 Bytes

File metadata and controls

43 lines (33 loc) · 1006 Bytes

Send 2fa code

URL Requires Auth HTTP Method
/api/v1/users.2fa.sendEmailCode yes POST

Example Call

curl  -H 'X-Auth-Token: _2u_4MzRroRcnqc59GYUY_Kwgr9HgtZ9HCKn-2aIvMJ' \
      -H 'X-User-Id: FL2fZL4ERhwA3gWiS' \
      -H "Content-type: application/json" \
      'http://localhost:3000/api/v1/users.2fa.sendEmailCode\
      -d "emailOrUsername=email@rocket.chat"

Result

Success

{
    "success": true
}

Errors

The following error can occur upon the endpoint.‌

  • Valid Email or Username: Requires selector param for the request to be made.

{% tabs %} {% tab title="Valid Email or Username " %}

{
    "success": false,
    "error": "emailOrUsername is required [error-parameter-required]",
    "errorType": "error-parameter-required"
}

{% endtab %} {% endtabs %}