authorizeOperation
Attempts to authorize an operation that is pending multi-factor authorization using a one-time password.
Syntax
Copy
function authorizeOperation(requestSessionId: string; tagValues: any; status: string): IFtosReqAuthResponse
| Parameter |
Type |
Description |
|---|---|---|
requestSessionId
|
string |
Unique ID of the authorization request. |
tagValues
|
any |
Dictionary which must contain the OTP key for the one-time password used for authentication. If the wrong password is provided, the authorization request will fail. |
status
|
string |
|
Return Value
Returns a IFtosReqAuthResponse JSON object containing details about the authorization status.
Copy
{
isSuccess: boolean;
navigateToEntityFormName: string;
nagivateToEntityId: string;
navigateToEntityName: string;
navigateToPageNo: string;
}
| Property | Type | Description |
|---|---|---|
isSuccess
|
boolean |
|
navigateToEntityFormName
|
string | Entity form defined in the authorization automation script's navigation rule. For details, see the Innovation Studio User Guide. |
navigateToEntityId
|
string | Record ID defined in the authorization automation script's navigation rule. For details, see the Innovation Studio User Guide. |
navigateToEntityName
|
string | Entity name defined in the authorization automation script's navigation rule. For details, see the Innovation Studio User Guide. |
navigateToPageNo
|
string | Form step defined in the authorization automation script's navigation rule. For details, see the Innovation Studio User Guide. |
Examples
In this example:
- We approve a previously initiated authorization request called reqResponse. For more details, see requestOperationAuthorization.
- We provide the one-time password retrieved from the client-side process in the otp input parameter. For more information, see ftos.context.
Copy
authorizeOperation(reqResponse.authSessionId, {OTP: context.data.otp}, 'approved');