|
|
Error Codes
- 100: invalid HTTP method
- The HTTP method used was incorrect
- 101: invalid API key
- The API key used is invalid
- 102: invalid session
- The session id is invalid
- 103: invalid API method
- The API method used is invalid
- 104: invalid response format
- The response format requested is not supported
- 105: invalid user and/or password
- The login credentials provided were invalid
- 106: not logged in
- The referenced session contained no logged-in user
- 107: already logged in
- The referenced session already contains a logged-in user
- 108: invalid room id
- The room id is invalid
- 109: invalid ticket
- The ticket is invalid
- 110: no nickname set
- A nickname must be set for the referenced ticket before speaking
- 111: no message
- The message parameter was not provided
- 112: rate limited
- You have exceeded the allowable rate for this method
- 113: insufficient permissions
- The API key associated with the current session does not have permission to speak in this room
- 114: no counter parameter
- The counter parameter was not provided
- 115: no nickname parameter
- The nickname parameter was not provided
- 116: invalid room password
- The room password is invalid
- 117: room requires password
- The room requires a password, and the password parameter was not provided
- 118: invalid client type
- The client type is not valid
- 119: no client type parameter
- No client type parameter was provided
- 120: invalid encoding
- You submitted data that contained invalid UTF-8 encoding. See API Basics for details.
- 122: repeated counter
- You are repeatedly calling room.observe with the same stale counter value. Verify that you are properly updating your local counter.
- 124: missing parameter
- Some parameters are missing
- 125: too many rooms
- The current user has already reached the maximum number of allowed rooms.
- 126: id unavailable
- The room id you requested is unavailable
- 127: image too large
- The image you provided was too large
- 128: invalid parameters
- The parameters you passed for year, month, and/or day were invalid or incomplete.
- 129: invalid occupant id
- The occupant_id parameter did not identify a current occupant of the room.
- 999: unspecified failure
- Unknown error
Sample responses
XML
A successful method call returns a document like this:
<?xml version="1.0" encoding="UTF-8"?> <response> <status>ok</stat> [method-specific-payload] </response>
If an error occurs, a document like the following is returned:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>fail</status>
<error>
<code>[error-code]</code>
<message>[error-message]</message>
</error>
</response>The values for the method-specific-payload item is defined on each method’s reference page.
JSON
To request an API method response in JSON format, simply pass the parameter “format” with the value “json”. If the parameter “callback” is also present, the JSON data structure will be wrapped inside a call to a function named by the value of “callback”.
A successful method call returns a JSON data structure like this:
{
"status": "ok",
[method-specific-payload]
}If, for example, the parameter “callback” was passed with the value “myFunction”, the following would be returned:
myFunction({
"status": "ok",
[method-specific-payload]
});If an error occurs, a JSON data structure like the following is returned:
{
"status": "fail",
"error": {
"message": [error-message],
"code": [error-code]
}
}Likewise, if the parameter “callback” was passed with the value “whizBang”, the following would be returned:
whizBang({
"status": "fail",
"error": {
"message": [error-message],
"code": [error-code]
}
});The values for the method-specific-payload item is defined on each method’s reference page.
