The Tweakker API is a HTTP WebService for sending OTA settings to mobile devices. Included are methods for sending settings, and querying about supported settings and devices.
Introduction
All users of the Tweakker API will be given a token used for authentication. This token is a required parameter for all calls to the Tweakker API WebService.
Apart from the token, for security, the Tweakker API WebService will only be open for certain IPs, configured on a per user basis.
All HTTP calls to the Tweakker API WebService uses the HTTP GET method.
The Tweakker API WebService returns XML per default. It's possible to get other formats by specifying the output parameter. Currently valid values for the output parameter are:
- xml
- The Tweakker API WebService returns XML
- yaml
- The Tweakker API WebService returns YAML
- json
- The Tweakker API WebService returns JSON
Methods
The Tweakker API WebService currently supports seven different methods:
- getSettings
- Query for settings defined for the current user
- getBrands
- Query for brands (e.g. Nokia, SonyEricsson, etc.) supported
- getModels
- Query for models supported for a specific brand
- sendSetting
- Sends a setting
- getHelp
- Gets end-user installation help
- getDeviceImage
- Gets an image of a device
- getBrandImage
- Gets an image of a brand logo
Method getSettings
This method returns a list of names of setting defined for the current user.
Required parameters are:
- token
- The users private token
Optional parameters are:
- brand
- The device brand
- model
- The device model
If called with the brand and model parameters, getSettings only returns the names of the settings supported by that perticular device.
Example 1: getSetting simple request
Request:
Response:
success
Test
WAP
Bookmark
]]>
Example 2: getSetting request with device
Request:
Response:
success
Test
WAP
]]>
Method getBrands
This method returns a list of supported device brands.
Required parameters are:
- token
- The users private token
Optional parameters are:
- setting
- The name of one of the users settings
If called with the setting parameter, only brands supporting the particular setting er returned.
Example 3: getBrands simple request
Request:
Response:
success
3
AK Mobile
AWG
⋮
Yuhua
ZTE
i-mobile
myWAY
]]>
Example 4: getBrands request with setting
Request:
Response:
success
3
AK Mobile
AWG
⋮
Yuhua
ZTE
i-mobile
myWAY
]]>
Method getModels
This method returns a list of supported models for a particular brand.
Required parameters are:
- token
- The users private token
- brand
- The brand of the devices wanted
Optional parameters are:
- setting
- The name of one of the users settings
If called with the setting parameter, only brands supporting the perticular setting are returned.
Example 5: getModels simple request
Request:
Response:
success
1680 classic
2220 slide
⋮
X6
X6 16GB
]]>
Example 6: getModels request with setting
Request:
Response:
success
1680 classic
2220 slide
⋮
X6
X6 16GB
]]>
Method sendSetting
This methods sends a specific setting to a specific receiver.
Required parameters are:
- token
- The users private token
- brand
- The brand of the receivers device
- model
- The model of the receivers device
- setting
- The setting to send
- msisdn
- The MSISDN of the receiver
Example 7: sendSetting request
Request:
Response:
success
1
]]>
Method getHelp
This method get a step-by-step installation guide for a setting, intended for the end-user. The guide will be returned as a snippet of HTML (it is also a valid XML snippet).
Required parameters are:
- token
- The users private token
- brand
- The brand of device to get help for
- model
- The model of device to get help for
- setting
- The setting to get help for
- locale
- The language af the returned help text in ISO format (e.g. english = en). See this page for a list of supported languages.
Example 8: getHelp request
Request:
Response:
success
<ol>
<li>You will receive a bookmark for your phone.</li>
<li>The display shows: "<kbd>To accept, enter authentication code:</kbd ↵
>".</li>
<li>Enter <span class="pin">1234</span> and press "<kbd>OK</kbd ↵
>".</li>
<li>Your bookmark is saved.</li>
</ol>
]]>
Method getDeviceImage
This method returns a JPEG image of a device. Please notice that this call also user token, and as also bound by IP restrictions, so it's adviced that you proxy this call (and perhaps cache the result).
Required parameters are:
- token
- The users private token
- brand
- The brand of device to get image for
- model
- The model of device to get image for
Optional parameters are:
- width
- The width of the returned image in pixels
- height
- The height of the returned image in pixels
The width and height parameters default to 256. The maximum width and height is 256. The image will be scaled to fit the requested size without distortion in the aspect ratio.'
Example 9: getDeviceImage request
Request:
Response:
Method getBrandImage
This method returns a JPEG image of a brand logo. Please notice that this call also user token, and as also bound by IP restrictions, so it's adviced that you proxy this call (and perhaps cache the result).
Required parameters are:
- token
- The users private token
- brand
- The brand of device to get image for
Optional parameters are:
- width
- The width of the returned image in pixels
- height
- The height of the returned image in pixels
The width and height parameters default to 256. The maximum width and height is 256. The image will be scaled to fit the requested size without distortion in the aspect ratio.'
Example 10: getBrandImage request
Request:
Response:
Error messages
In case of errors the API will return XML in the following format:
Example 11: Error response
Response:
fail
[ERROR MESSAGE]
]]>
The following errors ([ERROR MESSAGE]) can be returned:
- Parameter token missing
- No token parameter was supplied to the API call, it's required on all calls
- Parameter PARAMETER missing
- A required parameter (PARAMETER) is missing from the method call
- Unknown user
- The token provided doesn't correspond with a known user
- No access allowed from [IP]
- Access is not allowed from the callers IP, contact us if you want access opened
- No such action '[ACTION]'
- An unknown method was called, e.g. misspelled method call: getSetings
- Unknown setting
- The value of the setting parameter doesn't correspond with a setting name in the users profile

