Skip to main content

Credential states

Credentials go through various states during their lifecycle. Understanding these states is crucial for providing appropriate UI feedback to your users.

Each credential object has a state field:

...
state: {
index: 3, // Number from -2 to 7
max: 7, // Always 7
title: "2FA code is required", // Title of the current state
message: "A 2FA code has been sent to ***@gmail.com" // Instructions for the current state
},
...
StateIndexDescriptionPossible actions
Unknown0Something went wrong - Unexpected stateDelete, Re-connect
Preparing collect1Initial preparation phase before collection startsDelete, View collect
Login in progress2Authentication process is underwayDelete, View collect
2FA code required3Two-factor authentication code is needed from userDelete, View collect
Performing 2FA4Processing the provided 2FA codeDelete, View collect
Collecting data5Gathering data from the collector sourceDelete, View collect
Downloading invoices6Retrieving invoice filesDelete, View collect
Done7Collection completed successfullyDelete
Error-1An error occurred during the processDelete
Disconnected-2Credential needs to be reconnectedDelete, Re-connect

State Flow Diagram

state_diagram