API Reference - pims.authentication.otp-withPIN
Info: Stellantis Mobile SDK is not publicly available.
Component:
📱
Enrollment
PSA
Tutorial:
check-out
Enrollment.
SDK Version:
v2.3
API Available since:
v2.0
API Last update:
v2.0
Plateforme Compatibility: PSA
Security:
- Authentication: Authentication is required.
Operations:
Returns an OTP (One Time Password) with PIN.
Input Parameters Object | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
action | Name of the action to perform, in this case |
String |
|
withPIN
|
true |
pinCode | Account PIN code value. |
String |
|
1234
|
true |
Output Data Object | ||||
---|---|---|---|---|
Data name | Description | Type | Unit/Values | Example |
otp | OTP value. |
String |
|
|
Error | ||
---|---|---|
No errors |
Code Example
1
2
3
4
5
6
7
8
9
10
pims.get("pims.authentication.otp",
mapOf( /* parameters */
Pair("action", "withPIN"),
Pair("pinCode", "1234")
)
) { message -> when (message["status"] as? String) {
"SUCCEEDED" -> { } // handle succeeded status
"FAILED" -> { } // handle failed status
} }
1
2
3
4
5
6
7
8
9
10
pims.get(api: "pims.authentication.otp",
parameters: [
"action": "withPIN",
"pinCode": "1234"
]
) { (message) in
if message["status"] == "SUCCEEDED" { } // handle succeeded status
else if message["status"] == "FAILED" { } // handle failed status
}
1
2
3
4
5
6
7
8
// representation of the `succeeded` dictionary object message as JSON
{
"transactionId": "953cfefb-bc72",
"status": "SUCCEEDED",
"result": {
"otp": " "
}
}
false