API Reference - pims.authentication.smscode-enrollment
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:
This api allows to perform the first steps of device enrollment, next step is pims.authentication.enrollment - enroll.
GET will request an SMS code. The code is send to the user trusted phone number, that’s why a trusted phone number should is required before calling this API, cf pims.authentication.trustedphonenumber.
When the code is receive, it should be validated using SET pims.authentication.smscode.
Input Parameters Object | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
type | Type of SMS, in this case |
String |
|
enrollment
|
true |
Output Data Object | ||||
---|---|---|---|---|
No outputted data |
Error | ||
---|---|---|
No errors |
Code Example
1
2
3
4
5
6
7
8
9
pims.get("pims.authentication.smscode",
mapOf( /* parameters */
Pair("type", "enrollment")
)
) { message -> when (message["status"] as? String) {
"SUCCEEDED" -> { } // handle succeeded status
"FAILED" -> { } // handle failed status
} }
1
2
3
4
5
6
7
8
9
pims.get(api: "pims.authentication.smscode",
parameters: [
"type": "enrollment"
]
) { (message) in
if message["status"] == "SUCCEEDED" { } // handle succeeded status
else if message["status"] == "FAILED" { } // handle failed status
}
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
"transactionId": "953cfefb-bc72",
"status": "SUCCEEDED",
"result": { }
}
false