Get Current User Profile API
Require Authentication
This API is used to get current user profile based on combination of deviceID and token.
URL
api/users/profile
Required parameter
- deviceID
- token
Optional parameter
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2"
}
Possible return HTTP status code
- 200
- 401
- 405
Return message
{
"status": "success",
"message": {
"profile": {
"userID": 90,
"username": "support@smartsensor.com.au",
"firstName": "Support",
"lastName": "Support",
"phone": "",
"mobile": "",
"profilePicture": "https://wasteinsights-public-files.s3.ap-southeast-2.amazonaws.com/images/icon_placeholder_logo_individu.jpg",
"createdDate": 1521442184,
"active": "Y",
"timezoneOffset": 420,
"timezoneName": "Asia/Jakarta",
"isEmailVerified": "Y",
"welcomepopup": "N",
"isDemo": "N",
"acceptEula": "Y",
"acceptEulaDate": "1681211255",
"acceptEulaVer": "2",
"OSVersion": "iOS 9.2.0",
"appVersion": "SmartSensor 1.0.0",
"notificationCenterType": "apple",
"buildVersion": "DEV",
"udl_timezoneOffset": "420",
"udl_timezoneName": "Asia/Jakarta",
"departmentID": 46,
"departmentName": "Administrator"
},
"company": {
"companyID": 16,
"companyName": "Smartsensor Live Testing",
"companyLogoURL": "https://wasteinsights-public-files.s3.ap-southeast-2.amazonaws.com/images/icon_placeholder_logo_company.jpg",
"companyAddress1": "3/441 Nudgee Road",
"companyAddress2": "",
"companyCity": "Hendra",
"companyState": "QLD",
"companyCountry": "AU",
"companyZipCode": "4011",
"companyLatitude": -27.415924072266,
"companyLongitude": 153.07464599609,
"companyPhone": "",
"companyFax": "",
"companyWebsite": "",
"expiredDate": 0,
"default_currencyCode": "AUD",
"default_paymentPeriod": "monthly",
"licenseTypeID": 1,
"licenseTypeName": "Town Plan"
},
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "579aa72a3a496f84c7aa4ffc325981ac",
"usermulticompany": []
}
}
Note:
"timezoneOffset" contains user time differences to UTC in minutes. For example, if it is 420, it means that it is UTC +7 hour (420 minutes / 60 minutes × 1 hour = 7 hour)
"timezoneName" contains user timezone name as mentioned in http://php.net/manual/en/timezones.php