The following sections will help you to get familiar with the Yahoo Messenger IM API.
Here are the basic guidelines for using the Yahoo Messenger IM API:
4xx or 5xx HTTP status code
with an optional embedded error element.
The Yahoo Messenger IM API accepts standard OAuth credentials passed through the HTTP Authorization header. The API also allows usage of the PLAINTEXT OAuth signature method when submitting credentials.
The following servers are available:
developer.messenger.yahooapis.comThe following content types are supported:
application/json;charset=utf-8
The following table lists the standard attribute data type definitions used throughout the Yahoo Messenger IM API.
| Attribute | Data Type | Definition |
|---|---|---|
sid
|
string | The session identifier |
presenceState
|
integer |
The current presence state. Acceptable values are:
|
network
|
string |
Acceptable values are: " |
This following table lists the error definitions for the Yahoo Messenger IM SDK.
| Application Error Codes | Application Error Code Definitions |
|---|---|
| 0 | OK |
| 1 | Internal Server Error |
| 2 | User Exists Error |
| 3 | User Does Not Exist Error |
| 4 | Invalid Credentials Error |
| 6 | Max Buddies Error |
| 7 | Max Groups Error |
| 8 | Group Exists Error |
| 10 | Max Ignored Users Error |
| 12 | User Is Contact Error |
| 22 | Yahoo Parents Control Error |
| 28 | Session Expired Error |
| 30 | Ban Error |
| 32 | Invalid Group ID Error |
| 33 | User in Ignore List Error |
| 42 | Max Pending Contact Authorizations Error |
| -1000 | Invalid Sender Error |
| -1001 | Invalid Target Error |
| -1003 | Unsupported Content Type Error |
| -1004 | Unsupported User Agent ID Error |
| -1005 | Invalid Arguments / Bad Message Error |
| -1006 | Underage Error |
| -1009 | Capability Check Error |
| (default) | Internal Server Error |
The following table lists the possible error codes for each HTTP status.
| HTTP Status | Application Error Codes |
|---|---|
| 200, 201 | N/A |
| 400 | -1005, -1004, -1003, -1001, -1000, 2, 3, 6, 7, 8, 10, 12, 32, 33, 42 |
| 401 | 4, 28 |
| 403 | -1009, -1006, 22, 30 |
| 404 | 3, 32 |
| 500 | 1, All Other Error Codes |
The following user agents are supported.
The following format is supported for mobile clients.
Please note the following:
Application Version should be a 4-part string, such as
1.0.0.1Here is a sample user agent for mobile clients.
The string is allowed in the following HTTP header:
User-AgentThe following format is supported for other clients. Although the format is shown on several lines, it should appear entirely on a single line.
Please note the following:
Application Version should be a 4-part string, such as
1.0.0.1Here is a sample user agent for other clients. Again, note that the entry should appear on a single line.
The string is allowed in the following HTTP header:
User-AgentX-Yahoo-Msgr-User-AgentThe following steps are typically executed in a Yahoo Messenger session:
POST /session". Note that:
buddyInfo notifications for only those buddies that are currently logged in.
offlineMessage and sysMsg data, respectively.
DELETE /session" to logout from Yahoo
Messenger.