Request Headers (Applies to all methods)
GET
/api/apps/{appID}/users/me/phone-number
Get the phone number of the user.
An Anonymous access is not allowed. This method can be accessed by the application administrator and the user himself. Other users can access the method if the application property "exposeFullUserDataToOthers" is set to true.
Content-Type application/vnd.kii.PhoneNumberRetrievalResponse+json
Name | Type | Description |
---|---|---|
phoneNumber | string | The phone number. |
verified | boolean | The flag that indicates if the phone number is verified or not. |
Content-Type application/vnd.kii.UserNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the user. This can be the userID or address field. |
value | string | The field value used for searching the user. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
Content-Type application/vnd.kii.UserWithoutAddressException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_ADDRESS_NOT_FOUND". |
message | string | The error message. |
userID | string | The ID of the user without address |
appID | string | The ID of the application. |
PUT
/api/apps/{appID}/users/me/phone-number
Update the phone number of the user.
This method can be performed by the administrator and by the user himself. Setting the parameter "verified" to true can be done only with the application administrator credentials.
Content-Type application/vnd.kii.PhoneNumberModificationRequest+json
The data for updating the phone number.
{
"phoneNumber": "[string]",
"country": "[string]",
"verified": "[boolean]"
}
Content-Type (None)
Content-Type application/vnd.kii.UserNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the user. This can be the userID or address field. |
value | string | The field value used for searching the user. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
Content-Type application/vnd.kii.AddressAlreadyInUseException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_ALREADY_EXISTS". |
message | string | The error message. |
field | string | The field used to check the user already exists, can be "loginName", "emailAddress" or "phoneNumber". |
value | string | The value of the field. |
Content-Type application/vnd.kii.OperationNotAllowedException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "OPERATION_NOT_ALLOWED". |
message | string | The error message. |
DELETE
/api/apps/{appID}/users/me/phone-number
Remove the phone number from the user.
Can be performed by the administrator and the user himself.
Content-Type (None)
Content-Type application/vnd.kii.UserNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the user. This can be the userID or address field. |
value | string | The field value used for searching the user. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |