Appearance
staff.confirmations
1 method on staff.confirmations. Each returns the answer's data and throws NoviqaError on a failed answer.
create
POST
/admin/v1/confirmationsGet a confirmation code
Confirm dangerous actions (MT5): for staff holding the confirm_actions right, a balance operation (single or bulk) and a bulk close run only with a fresh code. This answers a random 6-digit code for the user to type and its token; send both back as confirm_token / confirm_code with the action. A code is single-use, belongs to the caller, lives expires_in seconds (120) and allows 3 wrong tries. Without the right the actions need nothing (and this route is refused). No body.
More details
Rights: the staff member needs every one of: confirm_actions.
Returns
Promise<Confirmation>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.confirmations.create()bash
curl -X POST "$NOVIQA_API_URL/admin/v1/confirmations" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"code": "string",
"expires_in": 1,
"token": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.confirmations.create(options?: RequestOptions): Promise<account.Confirmation>