Payload delivered to the listener registered with addJourneyResponseListener(). type is response, instruction, or error.
A journey step, including terminal success and rejection.
{
type: 'response',
journeyStepId: 'emailOTPAuthentication',
response: {
journeyStepId: 'emailOTPAuthentication',
journeyStepIdRaw: 'transmit_platform_email_otp_authentication',
data: {},
clientResponseOptions: {},
token: '',
code: '',
errorData: { code: '', message: '' },
},
}• journeyStepId: string
Copy of response.journeyStepId, normalized across iOS and Android. See STEPS. A custom or unrecognized action is passed through as its raw identifier.
• Optional data: Object
Free-form step payload.
• Optional clientResponseOptions: Object
Options the step accepts. Each option can include id, label, type, and schema. type is clientInput, cancel, fail, resend, or custom. Submit the chosen option with submitClientResponse().
{
clientInput: {
id: 'clientInput',
label: 'Verify',
type: 'clientInput',
schema: [{ name: 'passcode', type: 'string', optional: false }],
},
resend: { id: 'resend', label: 'Resend code', type: 'resend' },
cancel: { id: 'cancel', label: 'Cancel', type: 'cancel' },
}The plugin accepts the camelCase tokens above and the snake_case ids the server may put on option.id (client_input, action_failure). Pass either form to submitClientResponse.
• Optional token: string
Present on success.
• Optional code: string
Token-exchange code. Present on success.
• Optional errorData: { code: string, message: string }
Present on a retryable step error, such as a wrong one-time passcode. The journey is still on that step.
• journeyStepIdRaw: string
Step id as the native SDK reported it, before normalization.
A side-channel instruction. Current types are PIN registration commit and PIN deletion commit. See INSTRUCTIONS.
{
type: 'instruction',
instruction: { type: 'pinCodeRegistrationCommit', typeRaw: '', stepId: '', data: {} },
}• type: string
Normalized instruction type.
• typeRaw: string
Instruction type as the native SDK reported it.
• stepId: string
Step that emitted the instruction.
• data: Object
Instruction payload.
A journey failure. Argument and other synchronous failures reject the method Promise instead. See Promise rejection codes.
{
type: 'error',
error: { code: 'networkError', message: '' },
}error.code is the same string on iOS and Android:
notInitialized, noActiveJourney, networkError, clientResponseNotValid, serverError, invalidInitializationOptions, invalidStateString, internalError, deviceRegistrationError, deviceValidationError, invalidCredentials, expiredOTPPasscode, expiredValidationPasscode, maxResendReached, missingRequestIdInApprovalPayload
Android also reports Identity Verification failures on this channel: idvCameraPermissionRequired, idvSdkDisabled, idvSessionNotValid, idvInitializationError, idvNotInitialized, idvCanceled, idvInternalError, idvNotAvailable. The iOS SDK 1.2.5 has no equivalent cases, so the same failure arrives there as internalError. Treat an unrecognized code as internalError.