Mobile SDK

iOS or Android

    API Reference - pims.authentication.smscode-enrollment

    Info: Stellantis Mobile SDK for ex Groupe PSA brands (Citroën, DS, Peugeot, Opel and Vauxhall) is not publicly available for now.
    Available since: v2.0.X
    Component: StrongAuthentication
    Security: Authentication is required.
    Operations:

    The Get & Set operations of 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 the SET operation.

    Input Parameter
    Param name Description Type Unit/Values Example Required
    type

    Type of SMS, in this case enrollment.

    String

    enrollment: sms for enrollment

    enrollment true
    Output Data
    No data
    Error
    Error Code Error Label
    2001

    Facade not initialized

    2006

    Core not well configured

    2101

    Missing [PARAMETER] parameter

    2102

    Invalid [PARAMETER] parameter

    2201

    Timeout/Polling Timeout/Command Timeout

    2202

    Network problem : No internet

    2204

    Server Error

    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"] == "SUCEEDED"    { }    // 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": null
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    
    // representation of the `failed` dictionary objects messages as JSON
    
    /* -------- STATUS FAILED: 2001 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2001,
        "label": "Facade not initialized"
      }
    }
    /* -------- STATUS FAILED: 2006 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2006,
        "label": "Core not well configured"
      }
    }
    /* -------- STATUS FAILED: 2101 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2101,
        "label": "Missing [PARAMETER] parameter"
      }
    }
    /* -------- STATUS FAILED: 2102 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2102,
        "label": "Invalid [PARAMETER] parameter"
      }
    }
    /* -------- STATUS FAILED: 2201 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2201,
        "label": "Timeout/Polling Timeout/Command Timeout"
      }
    }
    /* -------- STATUS FAILED: 2202 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2202,
        "label": "Network problem : No internet"
      }
    }
    /* -------- STATUS FAILED: 2204 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2204,
        "label": "Server Error"
      }
    }
    

    The Get & Set operations of this api allows to perform the first steps of device enrollment, next step is pims.authentication.enrollment - enroll.

    SET will send the SMS code received on the user trusted phone number for validation.

    The SMS is received using the GET operation.

    Input Parameter
    Param name Description Type Unit/Values Example Required
    action

    Name of the action to perform, in this case Enrollment.

    String

    enrollment: enroll device

    enrollment true
    smsCode

    SMS code value. See GET pims.authentication.smscode - enrollment.

    Integer

    n/a

    true
    Output Data
    Data name Description Type Unit/Values Example
    status

    Status of the action.

    string

    - NotEnrolled

    - AlreadyEnrolled
    AlreadyEnrolled
    Error
    Error Code Error Label
    2001

    Facade not initialized

    2006

    Core not well configured

    2102

    Invalid [PARAMETER] parameter

    2201

    Timeout/Polling Timeout/Command Timeout

    2202

    Network problem : No internet

    2204

    Server Error

    2308

    inwebo: access refused

    2309

    inwebo: version error

    2310

    inwebo: account is blocked

    2311

    inwebo: internal state not correct

    2312

    inwebo: device is disabled or unknown

    2313

    inwebo: User must activate inWebo helium or inWebo Desktop Token before achieving this operation

    2314

    inwebo: No service is available

    2316

    inwebo: the operation succeeded but it required a post-synchronization which failed

    2317

    inwebo: forbidden operation (due to activated state/blocked state/upgradable state)

    2344

    [Component] not configured

    Code Example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    pims.set("pims.authentication.smscode",
      mapOf( /* parameters */  
        Pair("action", "enrollment"),
        Pair("smsCode", " ")
      ) 
    ) { 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.set(api: "pims.authentication.smscode",
      parameters: [  
      "action": "enrollment",
      "smsCode": " "
      ]
      ) { (message) in 
        if message["status"] == "SUCEEDED"    { }    // 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": { 
      "status": "AlreadyEnrolled"
    } 
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    
    // representation of the `failed` dictionary objects messages as JSON
    
    /* -------- STATUS FAILED: 2001 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2001,
        "label": "Facade not initialized"
      }
    }
    /* -------- STATUS FAILED: 2006 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2006,
        "label": "Core not well configured"
      }
    }
    /* -------- STATUS FAILED: 2102 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2102,
        "label": "Invalid [PARAMETER] parameter"
      }
    }
    /* -------- STATUS FAILED: 2201 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2201,
        "label": "Timeout/Polling Timeout/Command Timeout"
      }
    }
    /* -------- STATUS FAILED: 2202 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2202,
        "label": "Network problem : No internet"
      }
    }
    /* -------- STATUS FAILED: 2204 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2204,
        "label": "Server Error"
      }
    }
    /* -------- STATUS FAILED: 2308 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2308,
        "label": "inwebo: access refused"
      }
    }
    /* -------- STATUS FAILED: 2309 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2309,
        "label": "inwebo: version error"
      }
    }
    /* -------- STATUS FAILED: 2310 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2310,
        "label": "inwebo: account is blocked "
      }
    }
    /* -------- STATUS FAILED: 2311 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2311,
        "label": "inwebo: internal state not correct"
      }
    }
    /* -------- STATUS FAILED: 2312 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2312,
        "label": "inwebo: device is disabled or unknown"
      }
    }
    /* -------- STATUS FAILED: 2313 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2313,
        "label": "inwebo: User must activate inWebo helium or inWebo Desktop Token before achieving this operation"
      }
    }
    /* -------- STATUS FAILED: 2314 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2314,
        "label": "inwebo: No service is available"
      }
    }
    /* -------- STATUS FAILED: 2316 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2316,
        "label": "inwebo: the operation succeeded but it required a post-synchronization which failed"
      }
    }
    /* -------- STATUS FAILED: 2317 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2317,
        "label": "inwebo: forbidden operation (due to activated state/blocked state/upgradable state)"
      }
    }
    /* -------- STATUS FAILED: 2344 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2344,
        "label": "[Component] not configured"
      }
    }