API: Access IDs & Device Information
Access the Unique iPad ID and/or Group IDs defined in Kiosk Pro's settings in your content. This can let you identify which kiosk is requesting a page or to tag form data with the ID of the sending kiosk.
Requirements
- Integration of our JavaScript API into your webpage
- Sample code to run within the app and download for integration into your own project is available here.
- Best practices for working with the JavaScript API are available here.
- App Settings
- Content > JavaScript API > Access JavaScript API = By Import
- Identification > Unique iPad ID and/or Group IDs > configured
Triggers via API Functions
Check Unique iPad ID
Supported in:
This function triggers a callback returning the Unique iPad ID set in Kiosk Pro settings.
Format | kp_requestKioskId(callback); |
Parameters | callback - [string] the name of the callback to be triggered after the function has been executed |
Callback format | callback(kioskId); |
Callback return values | kioskId - [string] the Unique iPad ID configured in Kiosk Pro's settings |
Set Unique iPad ID
This function triggers setting the unique iPad ID in the app's settings.
Format | kp_Identification_setKioskId(uniqueiPadId); |
Parameters | |
Check Group IDs
Supported in:
This function triggers a callback returning any Group IDs set for that device in Kiosk Pro settings.
Format | kp_Identification_getGroupIDs(); |
Status
Triggers kp_Identification_groupsIDsDidChange, which returns any Group IDs assigned to that device as an associative array.
Check App Version Name
Supported in:
This function triggers a callback returning the name of the Kiosk Pro app currently running on the device. For example, "Kiosk Pro Plus".
Format | kp_VersionAPI_requestProductName(callback); |
Parameters | callback - [string] the name of the callback to be triggered after the function has been executed |
Callback format | callback(productName); |
Callback return values | productName - [string] the version name of the Kiosk Pro app currently running on the device |
Check App Version Number
Supported in:
This function triggers a callback returning the main version number of the Kiosk Pro app currently running on the device. For example, "1.2".
Format | kp_VersionAPI_requestMainVersion(callback); |
Parameters | callback - [string] the name of the callback to be triggered after the function has been executed |
Callback format | callback(mainVersion); |
Callback return values | mainVersion - [string] the main version number of the Kiosk Pro app currently running on the device |
Check Device Info
Supported in:
This function triggers a callback returning arrays with known information about the device.
Format | kp_Identification_requestDeviceContextInfo(callback); |
Parameters | callback - [string] the name of the callback to be triggered after the function has been executed |
Callback format | callback(deviceInfo); |
Callback return values | deviceInfo - [array] containing the following:
|
Check Device Time Zone
Supported in:
This function triggers a callback returning arrays with the time zone currently configured for the device.
Format | kp_Identification_requestDeviceContextInfo(callback); |
Parameters | callback - [string] the name of the callback to be triggered after the function has been executed |
Callback format | callback(deviceInfo); |
Callback return values | deviceInfo - [array] containing the following:
|
Check Network Info
Supported in:
This function triggers a callback returning arrays with network and cellular carrier (if applicable) information for the device.
Format | kp_Identification_requestDeviceContextInfo(callback); |
Parameters | callback - [string] the name of the callback to be triggered after the function has been executed |
Callback format | callback(deviceInfo); |
Callback return values | deviceInfo - [array] containing the following:
|
Notifications via API Callbacks
On Group ID Change or API Request
Supported in:
This callback returns any Group IDs set for the device in Kiosk Pro settings as an associative array. Triggered by kp_Identification_getGroupIDs or a detected change in the Group IDs assigned in Kiosk Pro's settings.
Format | kp_Identification_groupsIDsDidChange(groupIDs); |
Return Values | groupIDs - an associative array containing Group IDs as key-value pairs. The following keys are supported (with spacing and capitalization as shown):
|
Sample Code
- This sample code relies on the JavaScript APIs built into Kiosk Pro and will not run successfully in other browsers or within our in-app help interface.
- To run sample code, set the app's homepage to kioskgroup.com/identification-api
- To download a .zip of sample code, click here.
Change Log
- Ability to return the Unique iPad ID added in version 1.1.
- Ability to return the app version name and number added in version 5.4.
- Ability to set and return group IDs added in version 6.6.
- Ability to return device info, time zone, and network info in version 10.0.
- Ability to set Unique iPad ID added in version 10.1.