Summary
Allows clients to create or work with RadioTime accounts. The action to take is specified by the c command parameter.
All calls to account methods must be made over HTTP/S. We strongly recommend all parameters be POSTed to the service rather than specified in a query string.
Authenticate
Verifies credentials associated with a RadioTime account.
Input
POST https://opml.radiotime.com/Account.ashx
c=auth&partnerId=XYZ&username=u&password=p
| Parameter | Description |
|---|---|
| c | Set to auth for this call |
| partnerId | Required; must be a valid RadioTime partner |
| username | The RadioTime account username |
| password | The plaintext account password |
Output
On success, the status of the OPML response will be set to 200. If the credentials cannot be authenticated, a 401 status will result.
Create
Creates a new RadioTime account, optionally associating with a device if the serial parameter is provided.
Input
# Create account for user in California
POST https://opml.radiotime.com/Account.ashx
c=create&partnerId=XYZ&username=u&password=p&email=e@mail.com&postalCode=90210
# Create account for user in London
POST https://opml.radiotime.com/Account.ashx
c=create&partnerId=XYZ&username=u&password=p&email=e@mail.com&city=London&countryId=n100
| Parameter | Description |
|---|---|
| c | Set to create for this call |
| partnerId | Required; must be a valid RadioTime partner |
| username | The RadioTime account username to create. Must be 12 alpahnumeric characters or less |
| password | The plaintext account password. Must be between 4 and 12 alphanumeric or symbol characters |
| The email address for the account. | |
| postalCode | If the user is in the US or Canada, the postal code of the user’s location |
| city | If no postalCode, the city of the user’s location |
| countryId | The RadioTime-specific country ID of the user’s location. These codes may be retrieved from the describe countries method |
| serial | Optional; the device serial key that may reference an existing anonymous account |
Output
On success, the status of the OPML response will be set to 200. On failure, look for the fault and fault_code elements in the header. The following codes may be set:
| Fault Code | Description |
|---|---|
| validation.email | The given email address is of invalid form (empty or incorrect) |
| validation.password | The given password is of invalid form (empty or incorrect) |
| validation.location | The given postalCode or city/country combination is invalid |
| validation.userNameExists | The requested account name is already taken |
| validation.emailExists | The requested email is already registered |
| validation.error | A validation error occurred |
Join
Associates a named RadioTime account with an existing device. If the user has created anonymous presets on the device, they will be merged with the account.
Input
POST https://opml.radiotime.com/Account.ashx
c=join&partnerId=XYZ&username=u&password=p&serial=123456789
| Parameter | Description |
|---|---|
| c | Set to join for this call |
| partnerId | Required; must be a valid RadioTime partner |
| username | The RadioTime account username |
| password | The plaintext account password |
| serial | The serial key of the device to associate |
Output
On success, the status of the OPML response will be set to 200. If the account is already associated with a device, the fault_code will be set to validation.deviceExists.
Drop
Removes a device from a named RadioTime account. This will reset any presets associated with the device.
Input
POST https://opml.radiotime.com/Account.ashx
c=drop&partnerId=XYZ&username=u&password=p&serial=123456789
| Parameter | Description |
|---|---|
| c | Set to drop for this call |
| partnerId | Required; must be a valid RadioTime partner |
| username | The RadioTime account username |
| password | The plaintext account password |
| serial | The unique serial key associated with the device to remove |
Output
On success, the status of the OPML response will be set to 200. If the device is not associated with the account, the fault_code element will be set to validation.deviceNotAssociated