functional overview
Retrieve information about the currently logged in user from UniBaaS.
Details of Functions
Retrieve information about the currently logged in user from UniBaaS. You can retrieve all or specify which information you want to retrieve.
When all is acquired,dictionary type and Dictionary (Logic)Please refer to the following to obtain the necessary information.
Information stored in dictionary when "Get All" (JSON format)
Unifinity Player version 3.X.X
{ "token_type": "Bearer", "access_token". "access_token": "5Gk_UbsjXdkWunAN", "expires_in": 3600, "user": { "id": 1, "name": "Yamada". "name": "Taro Yamada", "email": "", "user": { "id": 1 "email": "test@example.com", "email". "login_user_id": "", "platforms": [ { "uuid": "A2A3C4F9-06E2-44D7-A624-4151835E62CD", "device_token". "device_token": "devicetoken12345", "name": "Android 8.0", "player_version": "2.2.3", "name": "Android 8.0", "version". "login_at": "2017-07-21T17:32:28Z", "login_at_unixtime". "login_at_unixtime": 1546916972,. "created_at": "2017-07-21T17:32:28Z", "created_at_unixtime". "created_at_unixtime": 1546916972 } ],. "groups": [ { "name": "Company Group A", } "note": "", } "id": 1, [ { "user_count": 100 "user_count": 100 } ],. "json": { "data": "example" } }, } "partner": { "name": "Yamada Trading Co. "license_type": "device", } "id": 1,. "item": "Company Item Content", "json": { "item": "company_name": "Yamada Trading Co. "json": { "data": "example" } } }
Information stored in dictionary when "Get All" (JSON format)
Unifinity Player version 4.0.0 or later
{ "token_type": "Bearer", "access_token". "access_token": "5Gk_UbsjXdkWunAN", "expires_in": 3600, "user": { "id": 0, "name": "Yamada". "name": "Taro Yamada", "email": "", "user": { "id": 0, "name": "Taro Yamada", "email": "", "email": " "email": "test@example.com", "email". "login_user_id": "", "role": 2684354545 "role": 268435456, "platforms": [ { "uuid": "A2A3C4F9-06E2-44D7-A624-4151835E62CD", "device_token": "device_token": "device_token "device_token": "devicetoken12345", "name": "Android 8.0", "player_version": "2.2.3", "name": "Android 8.0", "version". "login_at": "2017-07-21T17:32:28Z", "login_at_unixtime". "login_at_unixtime": 1546916972,. "created_at": "2017-07-21T17:32:28Z", "created_at_unixtime". "created_at_unixtime": 1546916972 } ],. "groups": [ { "name": "Company Group A", } "note": "", } "id": 1," "setting": "", "role": 268435456,. "user_count": 100," } ],. "json": { "data": "example" } }, } "partner": { "name": "Yamada Trading Co. "contract_rank": "standard", } "license_type": "device", "id": 1, } "id": 1, "item": "company_item_content", "license_count": 200 "license_count": 200, "license_expired_on": "2021-12-31T00:00:00Z", "license_expired_on". "license_expired_on_unixtime": 1619740800, "license_remaining": 0.020, "license_count": 200, "license_expired_on": "2021-12-31T00:00:00Z", "license_remaining": 0.020 "license_remaining": 0, "unit_id": 0, "license_expired_on_unixtime": 1619740800, "license_remaining": 0 "unit_id": 0, "unit_name": "", "json": { "data": "example" } } }
Note: Differences by version
Details vary depending on the version of Unifinity Application Player.
Note: When using Unifinity Studio version 4.2.0 or later
Check the "UniBaaS authentication before debugging" checkbox in the [Preferences] tab of the properties.
[Caution] Known Defects Information
Depending on conditions, it may not be possible to retrieve logged-in user information. For more information.Known Defect Informationfor more information.
ReferenceJSON Contents
token_type | Indicates the type of access token. Usually it is Bearer. |
access_token | Access token. Set in the Authorization header of the HTTP communication. Bearer [access token]. |
expires_in | The life span for which the token is valid. The unit is seconds. |
user | A set of data about the logged-in user. |
user.id | The user's numeric ID number. |
user.name | The name of the user. |
user.email | The user's email address. It may be empty if the user is identified by a login ID. |
user.login_user_id | The login user ID of the user. It may be empty for users identified by email. |
user.role | Indicates the user's privileges. 0=user, 268435456=admin. |
user.platforms | A list of devices used by the user. |
user.platforms.device_token | Indicates tokens on a per-device basis. Required for some UniBaaS API calls. |
user.platforms.player_version | Indicates the version of Unifinity Application Player. |
user.platforms.login_at | The last login time at the terminal. |
user.platforms.login_at_unixtime | The last login time at the terminal in UNIX time. |
user.platforms.created_at | Registered time information. |
user.platforms.created_at_unixtime | The registered time information is expressed in UNIX time. |
user.groups | A list of groups to which the user belongs. |
user.groups.name | Group Name. |
user.groups.note | Group Notes. |
user.groups.id | The ID number expressed as a numerical value of the group. Used by some UniBaaS APIs. |
user.groups.role |
Indicates group permissions. 0=user, 268435456=admin. |
user.groups.user_count | The number of users belonging to the group. |
user.json | User-specific information is stored in JSON format. |
partner | This is a set of information about the company to which the user belongs. |
partner.name | Company Name. |
partner.contract_rank | Indicates the contract type. Available with Unifinity 4.0 or later. |
partner.license_type | Indicates whether the contract is per user or per device. |
partner.id | This is the ID number expressed as a numerical value of the company. Used by some UniBaaS APIs. |
partner.item | This is mainly history regarding contracts. |
partner.license_count | The number of contracted licenses. |
partner.license_expired_on | Contract Term. |
partner.license_expired_on_unixtime | The contract expiration date is expressed as a number in UNIX time. |
partner.license_remaining | Indicates the number of licenses remaining. |
partner.unit_id | Indicates the ID number of the sales agent that issued the contract. Available with Unifinity 4.0 or later. |
partner.unit_name | Indicates the name of the sales agent that issued the contract. Available with Unifinity 4.0 or later. |
partner.json | Company-specific settings in JSON format. |
For example, if you want to get an email from the information obtained, please refer to the following.
The elements that are arrays areIteration ForeachThe acquisition can be done by using the
Please refer to the following
parameter
- argument (e.g. function, program, programme)
-
User Information All Information username user ID Company Name Partner ID Email Address access token
- return value
- Only when "All Information" is specifieddictionary type
- If you specify a user name, user ID, company name, partner ID, email address, or access token,character string data