Location
/api/apps/{appID}/users/{accountType}:{address}/country
This resource represents the country of the current
user.
Request Headers (Applies to all methods)
Authorization
header
Required: Yes
GET
/api/apps/{appID}/users/{accountType}:{address}/country
Description
Get the country.
Security
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.
Name
Required?
type
Description
Authorization
Yes
string
Authorization header. OAuth2 Bearer token
Responses
200
Content-Type text/plain
The country has been retrieved successfully.
404
Content-Type application/vnd.kii.UserNotFoundException+json
The user was not found.
Contents
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. |
404
Content-Type application/vnd.kii.UserWithoutCountryException+json
The user did not have any value in the field "country".
Contents
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_COUNTRY_NOT_FOUND". |
message | string | The error message. |
userID | string | The ID of the user without country |
appID | string | The ID of the application. |
401
Content-Type application/vnd.kii.UnauthorizedAccessException+json
An anonymous access or an access by other users (when the
application property "exposeFullUserDataToOthers" is set to false)
was not allowed.
Contents
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). |