Device API

API

API Intro
Game Event API
Player API
Device API

Wrappers

Corona API Wrapper
Unity API Wrapper

Use the Device API to record custom properties for each device playing your game. Don't forget to URL encode the strings you submit. The Unity wrapper we developed automatically handles collecting a number of device properties.


Device API Parameters

Parameter Required? Datatype Description
gh_api_key yes char(256) The unique GAME_API_KEY of your game
gh_device_identifier yes char(256) A string that uniquely identifies a device. For example, a GUID or UUID.
YOUR_CUSTOM no char(256) You can include as many additional custom parameters as you need. These will be stored as properties on the device. Be sure to limit both the parameter name and value to char(256).


POST api/v2/devices - Record properties for all of your game devices
On Success - returns HTTP status 200 and '0 - Success' in the response text body.
On Failure - returns an appropriate HTTP status code and an error message in the response text body.


Example

curl -d "
gh_api_key=0000abcd&
gh_device_identifier=3sdf32sd324sdf234&
os=Windows&
os_version=7&
cpu_count=4
" -X POST http://www.mygamehud.com/api/v2/devices