The following API calls for session management are supported. Session management is used to initiate (log in), terminate (log off) a Yahoo! Messenger session, or to prevent an automatic logoff from occurring by submitting keepalive requests.
<access server>/v1/session
Refer to the section "Servers" earlier to determine your access server.
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Obtain the crumb associated with the Yahoo! credentials. The crumb is used with the Yahoo! Messenger Display Image API. Note that if your Yahoo! credentials change, you must obtain a new crumb. | N/A | N/A |
|
POST
|
Create a session (login) |
|
Note: even though all inputs are optional, the server still expects an empty POST body (JSON: "{}") |
|
<server>/v1/session
| HTTP Definition | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Validate and obtain session information. |
|
N/A |
|
DELETE
|
Delete a session (logoff) |
|
N/A | N/A |
<server>/v1/session/keepalive
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
PUT
|
Update the active time for the user. Refrain from sending more than once every 60 minutes, or as often as the expiration of
the |
|
N/A |
|
| Attribute | Data Type | Description |
|---|---|---|
sessionId
|
string | This is the Messenger session ID. The session ID is denoted by the '
sid
' attribute in subsequent API requests.
|
crumb
|
string | This is the Messenger crumb tied to the Yahoo! credentials. The crumb is used with the Yahoo! Messenger Display Image API. Note that the crumb value that is returned may not be URI safe, depending on the response content-type.
|
loggedIn
|
integer |
This value may be 0 or 1. '0' indicates that the '1' indicates that the |
primaryLoginId
|
string | The primary Yahoo! ID with which the user is logged into Yahoo! Messenger. |
profileLoginId
|
string | The profile Yahoo! ID with which the user is logged into Yahoo! Messenger. |
profileLoginIds
|
list of profileLoginId(s) |
This attribute is a list of
Example JSON for this attribute might be: "profileLoginIds":[{"profileLoginId":"profileID-1"}]
|
fieldsBuddyList
|
multi-value |
This attribute is an optimization to return subset(s) of the response "contacts" object. (See "contacts (list)" in the Schema section.) Acceptable values are: " " "
Cannot be used in conjunction with |
fieldsGroupList
|
multi-value |
This attribute is an optimization to return subset(s) of the response "groups" object. (See "groups (list)" in the Schema section.) Acceptable values are: " " "
Cannot be used in conjunction with |
presenceState
|
integer |
A code to indicate the current presence state. The default value is 0. A 999 value is not acceptable in this context. For additional information, refer to the top-level section "Data Type Definition" |
presenceMessage
|
string (UTF-8) | Applicable only with presenceState [0,2]. The string has a maximum of 512 bytes.
|
clientCapability
|
string |
Acceptable values are: " " " " |
clientCapabilities
|
list of clientCapability(s) |
This attribute is a list of
Example JSON for this attribute might be: "clientCapabilities":[{"clientCapability":"buzz"}]
|
server
|
string | Server name to use in all subsequence requests to the APIs where <server> is indicated.
|
notifyServer
|
string | Server name used for the Comet Style Notification Management (see Notification Management below). This attribute corresponds to all subsequent instances of <notification server> in this document.
|
contacts
|
Refer to "contacts (list)" in Schema section. | This attribute is a response given as a list of contacts |
notifyServerToken (input uri)
|
string |
If value equals "
If value equals "
|
notifyServerToken (response)
|
object |
Available keys include:
|
displayInfo
|
map |
Available keys include:
Example JSON for this attribute might be:
|
avatarPreference
|
string |
" " " |
avatarHash
|
string | Checksum for the avatar display image. Used to determine if the image for the sender may already be cached locally on the client |
checksum
|
string | Checksum for the custom display image. Used to determine if the image for the sender may already be cached locally on the client |
The presence management APIs are used to retrieve or update the user's Yahoo! Messenger presence status.
<server>/v1/presence
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Fetch your Yahoo! Messenger status. |
|
N/A |
|
PUT
|
Update your Yahoo! Messenger status. |
|
|
N/A |
| Attribute | Data Type | Description |
|---|---|---|
presenceState
|
integer | Refer to the top-level "Data Type Definition" |
presenceMessage
|
string (UTF-8) | Applicable only with presenceState [0,2]. The string has a maximum of 512 bytes.
|
The contact and contact list management APIs are used to retrieve or update the user's Yahoo! Messenger contact list.
<server>/v1/contact/{network}/{contactId}
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Fetch contact information for contactId.
|
|
N/A |
-contact
(Refer to "contact" in Schema section)
|
<server>/v1/contacts
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Fetch collection of contact resources. |
|
N/A |
-contacts
(Refer to "contacts (collection)" in Schema section)
|
POST
|
Used to re-arrange contacts in the contact list. NOTE: While this API might return a success status code, you must iterate through the individual responses in the response body to determine which request(s) succeeded and which request(s) failed. |
|
-moves
|
-moves
|
| Attribute | Data Type | Description |
|---|---|---|
fields
|
multi-value |
Optimization to return subset(s) of the contact/contacts response. Acceptable values are: " " " " " |
moves
|
array |
Array of:
|
The Group Management API calls are used to retrieve or maintain group resources for the Yahoo! Messenger user, including a list of current groups, their properties, and the contacts within them.
<server>/v1/group/{groupname}
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Get group resource for {groupname} |
|
N/A |
-group
(refer to "group" in Schema section)
|
POST
|
Rename {groupname} |
|
-groupName
|
N/A |
<server>/v1/group/{groupname}/contact/{network}/{contactId}
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
PUT
|
Add contactId to {
groupname
}
|
|
NOTE: Since all inputs are optional, the server still expects an empty POST body (JSON: "{}") |
N/A |
DELETE
|
Delete contactId from {groupname} |
|
N/A | N/A |
<server>/v1/groups
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Fetch a collection of group resources |
|
N/A |
-groups
(Refer to "groups (collection)" in Schema section)
|
| Attribute | Data Type | Description |
|---|---|---|
fields
|
multi-value |
Optimization to return subset(s) of the group/groups response object. Acceptable values are: " " " " |
groupName
|
string (UTF-8) | Max 160 bytes |
addAs
|
string | Explicit profile/primary ID with which to submit the request. The default is to use the profile Yahoo! ID credentials submitted. |
message
|
string | Invitation message to attach to the request. The string has a maximum of 2000 bytes. |
The ignore list and ignore user API calls are used to maintain a list of users that are prohibited from interacting with the Yahoo! Messenger user.
<server>/v1/ignorelist
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Fetch the entire ignore list. |
|
N/A |
-ignoredUsers
(refer to "ignoredUsers (collection)" in the Schema section.)
|
PUT
|
Batch insert users into the ignore list. |
|
-members
|
N/A |
DELETE
|
Batch delete users from the ignore list. |
|
-members
|
N/A |
<server>/v1/ignorelist/{network}/{ignoreId}
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
DELETE
|
Delete the ignoreId from the ignore list.
|
|
N/A | N/A |
PUT
|
Add the ignoreId to the ignore list.
|
|
N/A | N/A |
| Attribute | Data Type | Description |
|---|---|---|
members
|
array |
Array of:
Example: |
The following API calls for message management are supported.
<server>/v1/message/{network}/{targetId}
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
POST
|
Send a message |
|
|
N/A |
Table 2.1.
| Attribute | Data Type | Description |
|---|---|---|
sendAs
|
string (UTF-8) | Explicit primary/profile Yahoo! ID to send the message as. The default is to use the profile Yahoo! ID embedded within the Yahoo! credentials |
message
|
string (UTF-8) | The message string, which has a maximum of 2000 bytes. |
Events targeted for a login session are referred to as notifications. These include, but are not limited to, events such as instant messages and contact status updates. Clients may use either a periodic polling or comet-style push strategy to subscribe to notification events.
As we continue to enhance our APIs, it is possible that consumers of these APIs will be exposed to notification types not documented in this section. Consumers of these APIs are expected to be able to gracefully ignore such notifications.
<server>/v1/notifications
Clients can periodically poll for pending notifications using this design. Clients are expected to poll no more than once every 5 seconds at an average or run the risk of being denied service access. Currently this technique only supports JSON-encoded response payloads.
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Fetch inbound notifications for this login session. |
|
N/A |
|
| Attribute | Data Type | Definition |
|---|---|---|
seq
|
integer | The starting sequence number to fetch notifications from. The messenger counter begins at value 0. |
count
|
integer | The number of notifications to retrieve, starting from the seq number. The default is 10. The minimum is 1 and the maximum is 100. |
@pendingMsg
|
integer | Count of pending notifications still in the session notification cache. Absence indicates value = 0. However, this is currently not implemented. |
@syncStatus
|
integer | A value of 1 indicates that certain types of unread notifications were deleted from the session notification cache owing to client idleness. On receipt of such an indicator, clients are required to refresh their contact list state by re-subscribing for presence notifications using the /subscription/presence Subscription Management API with the refresh option. |
responses
|
array | List of notification(s). See "Notification Definition" below. |
<notification server>/v1/pushchannel/{primaryLoginId}
Clients may also maintain a long-lived HTTP GET request
against the Yahoo! Notification server, thereby creating the
illusion of a persistent communication channel between client and
server. Typical usage guidelines include:
HTTP GET request against the Yahoo!
Notification server.
HTTP GET request almost immediately.
GET request by responding with a 200 OK. The idle timeout value can be overridden by using the
'idle' parameter in the URI.
HTTP/1.1 and HTTP/1.0 protocol requests are
supported.
HTTP/1.1IM) - This cookie value is set by the Webservice during login (POST /session), or during a session keepalive (PUT /session/keepalive) if the URI input 'notifyServerToken=1' is provided.
imtoken) - This value is provided by the Webservice during login (POST /session), or during a session keepalive (PUT /session/keepalive) if the URI input 'notifyServerToken=2' is provided.
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
GET
|
Fetch inbound notifications for this login session. |
|
N/A |
|
| Attribute | Data Type | Description |
|---|---|---|
idle
|
integer | Value in seconds to maintain an idle connection. If the value is greater than the supported maximum, the server will override this value with its supported maximum. |
seq
|
integer | Sequence number to fetch notifications from. The messenger counter begins at value 0. |
primaryLoginId
|
string | The primary login ID obtained during login ()
|
format
|
string | Currently, the supported formats are: "json"
|
@pendingMsg
|
integer | Count of pending notifications still in the session notification cache. An absence indicates value = 0. However, this is currently not implemented. |
@syncStatus
|
integer | A value of 1 indicates that certain types of unread notifications were deleted from the session notification cache owing to client idleness. On receipt of such an indicator, clients are required to refresh their contact list state by re-subscribing for presence notifications using the /subscription/presence Subscription Management API with the refresh option. |
responses
|
array | List of notification(s). See "Notification Definition" below. |
The following table lists response HTTP status codes from the
notification server.
| HTTP Status Code | Definition |
|---|---|
200
|
OK |
400
|
Message format error; Bad URI parameters, etc. |
500
|
Internal Yahoo! server error |
The following table lists any non-standard HTTP headers in a
200 OK Response from the notification server.
| HTTP Header | Definition |
|---|---|
X-Max-Sequence
|
Max sequence number of notifications at server side. This header is only set when the response Content-Length is a non-zero value.
|
The buddyInfo message contains messenger client and login information
for one or more buddies. It is received in the following
scenarios.
buddyInfo notifications are received for buddies
that are not offline on the user's contact list.
buddyInfo notification is received.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
contact
|
array | (See table below) | Yes |
The following table provides the definition of the contact array above.
| Contact Attribute | Contact Attribute Data Type | Contract Attribute Definition | Mandatory |
|---|---|---|---|
sender
|
string | The sender IM ID | Yes |
presenceState
|
integer |
Presence state information for the contact.
|
Yes |
presenceMessage
|
string | A custom presence message for the contact | No |
clientType
|
string |
Enumeration of values: "0" => Regular desktop/web client (default) "1" => Mobile Client. Limit to 146 bytes when sending any message content "2" => Mobile client |
No |
customDNDStatus
|
integer |
Applicable only under the following conditions: 1. If this value is 2 and presenceState is 99, then you can treat presenceState to be 999 2. If this value is 1 and presenceState is 99, then you can treat presenceState to be 2 3. If this value is 0 and presenceState is 99, then you can treat presenceState to be 0 |
No |
clientCapabilities
|
bit mask |
Bit definitions: Bit 1 (decimal
value = 2) indicates if the client is capable of
" Bit 2 (decimal value = 4) indicates
if the client is capable of " Bit 15 (decimal value = 32768) indicates
if the client is capable of " |
Yes |
avatarPreference
|
string |
" " " |
No |
avatarHash
|
string | A checksum for the avatar display image. This is used to determine if the image for the sender may already be cached locally on the client. | No |
checksum
|
string | A checksum for the custom display image. This is used to determine if the image for the sender may already be cached locally on the client. | No |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
The buddyStatus contains updated messenger presence
information for a user. It is received in the following scenarios:
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
presenceState
|
integer |
Presence state information for the contact.
|
Yes |
presenceMessage
|
string | A custom presence message for the contact | No |
customDNDStatus
|
integer |
Applicable only under the following conditions: 1. If this value is 2 and presenceState is 99, then you can treat presenceState to be 999 2. If this value is 1 and presenceState is 99, then you can treat presenceState to be 2 3. If this value is 0 and presenceState is 99, then you can treat presenceState to be 0 |
No |
clientType
|
string |
Enumeration of values: " " " |
No |
The logOff message is received when a user whose presence has been subscribed to goes offline.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number. | Yes |
network
|
string | Indicates the IM network for 'buddy'. The default is "yahoo".
|
No |
status
|
integer | Currently always equal to 1. | Yes |
buddy
|
string | The user ID that has logged off. | Yes |
This is received when an instant message is sent to the user
logged in through this API. It can also be received with a non-zero value for errorCode, which indicates a failure to deliver an IM.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number. | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
timeStamp
|
integer | Indicates when the message was sent by the sender. The value is expressed as the number of seconds since epoch (00:00:00 Jan 1, 1970)
|
No |
msg
|
string | The instant message content | Yes |
hash
|
string | Unique IM server generated hash. To be used for reporting SPIM abuse. | No |
errorCode
|
integer |
Enumeration of values: A value of
|
No |
The offlineMessage indicates messages received while the user
was offline.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number. | Yes |
messages
|
list | The list of message(s). (See Notification Definition for 'message' type.)
|
Yes |
This is received when a system message is sent to the user logged in through this API.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number. | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
timeStamp
|
integer | Indicates when the message was sent by the sender. The value is expressed as the number of milliseconds since epoch (00:00:00 Jan 1, 1970)
|
No |
msg
|
string | The system message content | Yes |
The buddyAuthorize message is received in the following
scenarios.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
msg
|
string | The invite/accept/deny message | No |
authState
|
integer |
Values Enumeration:
|
No |
fname
|
string | First name for sender | No |
lname
|
string | Last name for sender | No |
nickName
|
string | Nickname for sender | No |
The disconnect message is received when a session has been
expired by the server. This message is only received in the context
of a Comet-style push notification scheme.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
receiver
|
string | This indicates who this notification is targeted to. | Yes |
reason
|
integer |
4 = Self-initiated Logoff: When the user does an explicit logoff.
|
Yes |
This message is received only when a contact changes their custom display image.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
url
|
string | The URL from where to obtain the new custom display image. | Yes |
checksum
|
string | A checksum for the custom image. This is used to determine if the image for the sender may already be cached locally by the client. | Yes |
This message is received only when a contact changes their avatar display image.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number. | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is 'yahoo'.
|
No |
avatarHash
|
string | Used to determine if the avatar image for the sender may already be cached locally on the client. | Yes |
receiver
|
string | Indicates which user this notification is targeted to. This is important when multiple profiles have been activated as part of the login. | Yes |
This message is received when a contact changes their display image preferences.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
avatarPreference
|
string |
2 = Display image type is 'custom' |
No |
avatarHash
|
string | Checksum for the avatar display image. This is used to determine if the image for the sender may already be cached locally on the client. | No |
checksum
|
string | Checksum for the custom display image. This is used to determine if the image for the sender may already be cached locally on the client. | No |
An emailAlert message is received:
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
numEmails
|
integer |
Typically the first notification received after login indicates the number of new emails received since the user last accessed their mailbox. During a login session, for each new email received, a notification is generated with this value set to 1. A value of 0 indicates a reset of the mail counter on the server side. This typically occurs after the user has accessed their mailbox. |
Yes |
The following attribute definitions are applicable for notifications generated as a result of new emails received during a login session.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
senderName
|
string | Display name as advertised by the sender | No |
senderEmailAddr
|
string | Email address of the sender | No |
emailSubject
|
string | Subject of the email | No |
The fileTransferInvite message is received by:
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number. | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
sessionId
|
string | The file transfer session ID | Yes |
action
|
integer |
|
Yes |
fileCount
|
integer | Indicates the total file count for this invite event. This is only available when the action indicates an Invitation Event. | No |
fileInfo
|
array | This is only available when the action indicates an Invitation Event. (see below). | No |
The following table gives the definition of the "fileInfo"
array.
| FileInfo Attribute | FileInfo Attribute Data Type | FileInfo Attribute Definition | Mandatory |
|---|---|---|---|
fileSize
|
integer | Size of the file in bytes | Yes |
fileName
|
string | The name of the file | Yes |
This message is part of the file transfer handshake flow.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
sessionId
|
string | The file transfer session ID | Yes |
transferType
|
integer | 3 = Relay-based file transfer
|
No |
transferTag
|
string | if transferType = 3, indicates the relay server IP address to be used.
|
No |
token
|
string | if transferType = 3, indicates the relay server token to be used. This is a short-lived token.
|
No |
fileName
|
string | The file name being transferred | No |
errorCode
|
integer |
Indicates a failure. Values are:
The default value indicates an unknown failure |
No |
This message is part of the file transfer handshake flow.
| Attribute | Attribute Data Type | Attribute Definition | Mandatory |
|---|---|---|---|
sequence
|
integer | The notification sequence number | Yes |
sender
|
string | The sender IM ID | Yes |
network
|
string | Indicates the IM network for 'sender'. The default is "yahoo".
|
No |
receiver
|
string | Indicates which user this IM is targeted to. This attribute is important when multiple profiles have been activated as part of the login. | Yes |
sessionId
|
string | The file transfer session ID | Yes |
transferType
|
integer | 3 = Relay-based file transfer
|
No |
transferTag
|
string | if transferType = 3, indicates the relay server IP address to be used.
|
No |
token
|
string | if transferType = 3, indicates the relay server token to be used
|
No |
fileName
|
string | The file name being transferred | No |
errorCode
|
integer |
Indicates a failure. Values are:
The default value indicates an unknown failure |
No |
oneFileDone
|
string | A non-zero value indicates that one file has been successfully received and the sender can send the next file in the queue. Note that this value is a string and not an integer. | No |
The Preferences Management APIs are used to set and retrieve the Yahoo! Messenger user's online preferences.
<server>/v1/preferences
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
PUT
|
Used to bulk update preferences |
|
-prefs
|
N/A |
GET
|
Used to bulk fetch preferences |
|
N/A |
-preferences
|
| Attribute | Data Type | Acceptable Input |
|---|---|---|
prefs
|
array |
Array of
Acceptable values by key:
Acceptable keys by category:
|
preferences
|
array | (see 'preferences' in Schema section) |
cat
|
string | Acceptable values include "general"
|
The Buddylist Authorization Management APIs are used to control which users are authorized to become the contact of the Yahoo! Messenger user.
<server>/v1/buddyrequest/{network}/{adderId}
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
DELETE
|
Deny a contact authorization from adderId |
|
|
N/A |
POST
|
Accept a contact authorization from adderId |
|
|
N/A |
| Attribute | Data Type | Description |
|---|---|---|
authReason
|
string (UTF-8) | Reason to attach to the accept/deny response. The string has a maximum of 2000 bytes. |
authAs
|
string | Explicit yahoo primary/profile ID to associate with the request. Default to Yahoo profile ID embedded within the Yahoo credentials. |
The Abuse Management APIs are provided to report users that engage in unwanted behavior.
<server>/v1/abuse/spim
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
POST
|
Reports IM spam (SPIM). Note that reporting SPIM abuse does not automatically block the spammer. Clients may optionally use the APIs defined under Ignore List Management to block the spammer |
|
|
N/A |
| Attribute | Data Type | Description |
|---|---|---|
spammerID
|
string | The spammer IM ID |
spammedAs
|
string | Explicit primary/profile Yahoo ID that was spammed. The attribute defaults to profile ID embedded within the Yahoo credentials. |
initiatedBy
|
integer |
Indicates if the IM conversation was initiated by:
|
network
|
string | Indicates the IM network for 'spammerId'. The default value is "yahoo".
|
spim
|
object |
Object sub-elements:
-initiatedBy (1 = spammee, 2 = spammer)
|
spims
|
list of spim(s) | List of spim object(s). At least 1 embedded spim object must have a 'hash' value set.
|
The following describes the subscription management APIs.
<server>/v1/subscription/presence
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
PUT
|
Used to subscribe or re-subscribe for all presence notifications. This includes users in both the contact list and the dynamic subscription (currently not supported). |
|
N/A | N/A |
DELETE
|
Used to unsubscribe to all presence notifications. This includes users in both the contact list and the dynamic subscription (currently not supported). |
|
N/A | N/A |
| Attribute | Data Type | Description |
|---|---|---|
refresh
|
integer | 1 = In addition to the subscription, this flag requests the server to refresh the client's contact list view by asynchronously
pushing "buddyInfo" notifications for the entire contact list.
|
See also the Yahoo! Messenger Display Image Management API section below.
avatarHash' value to
determine if a locally cached avatar for a user/contact needs to be
refreshed.
checksum' value to
determine if a locally cached avatar for a user/contact needs to be
refreshed.
To fetch your own display image:
displayInfo' to determine the
display image type (avatar/custom/etc). If the image is not already
cached locally on the client, fetch the image from the Yahoo!
display image web service.
To change your display image:
displayImage preference.
buddyInfo',
'displayImage', 'avatarImage', and 'displayImagePrefs' notifications to determine
the type of display image your contact uses. If the image is not
already cached locally on the client, fetch the image from the
Yahoo display image web service.
The Stealth Management APIs are used to control which contacts may see the user as visible or invisible even when they are logged in.
<server>/v1/stealth/visiblelist
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
PUT
|
Used to bulk insert into the messenger visible-to-list for this session. |
|
-members
|
N/A |
DELETE
|
Used to bulk delete from the messenger visible-to-list only for this session. Absence of any input members will result in a delete-all operation. |
|
-members
(optional)
|
N/A |
GET
|
Used to fetch the messenger visible-to-list. |
|
N/A |
-users
|
<server>/v1/stealth/invisiblelist
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
PUT
|
Used to bulk insert into the messenger invisible-to-list permanently. |
|
-members
|
N/A |
DELETE
|
Used to bulk delete from the messenger invisible-to-list permanently. Absence of any input members will result in a delete-all operation. |
|
-members
(optional)
|
N/A |
GET
|
Used to fetch the messenger invisible-to-list. |
|
N/A |
-users
|
| Attribute | Data Type | Description |
|---|---|---|
members
|
array |
Array of:
{"members":[ [ "id":"testId", "network":"yahoo" } ] } |
users
|
collection | (Refer to "users (collection)" in the Schema section.) |
The File Transfer Management API is responsible for negotiating the protocol handshake to initiate file transfers between Yahoo! Messenger clients. See also the Yahoo! Messenger File Transfer API, listed in a later section.
<server>/v1/filetransfer/relay
| HTTP Operation | Functionality | Input URI | Input Body | Response |
|---|---|---|---|---|
POST
|
Use this for the various relay-based filetransfer protocol handshake events |
|
NOTE:See below for more information. |
N/A |
The relay-based file transfer handshake is a client-administered protocol. It is the responsibility of consumers of this API to ensure the protocol flow follows the guidelines provided. As an example, a client should only process file transfer send/receive notifications for invites that have been accepted by the end user.
For the sender:
fileTransferInvite notification. If target declines the
file transfer, or if the sender cancels the file transfer, the
handshake protocol ends here.
fileTransferReceive
notification
fileTransferReceive notification. Refer to the Yahoo! Messenger File Transfer API documentation for more information on the
relay server protocol. Be sure to use the relayIP obtained in the handshake to connect to the relay server.
fileTransferReceive notification with the oneFileDone value set before iterating back to the start of this loop.
For the target:
fileTransferInvite notification
fileTransferInvite notification. If target
declines the file transfer, or if the sender cancels the file
transfer, the handshake protocol ends here
fileTransferSend notification
indicating the file name, file transfer token, and relay server IP
to connect to.
relayIP obtained in the handshake to connect to the relay server.
For all POST operations, use the following protocol
specifications:
| Action | Input Body Attributes |
|---|---|
| invite |
|
| cancel/accept/decline |
|
| send |
|
| receive |
|
| receive-continue |
|
| Attribute | Data Type | Description |
|---|---|---|
action
|
string |
Acceptable values are: " " " " " " " |
sendAs
|
string | The explicit primary/profile Yahoo ID to send the message as. The default is to use the primary Yahoo ID embedded within the yahoo credentials |
target
|
string | The target ID |
ftSessionId
|
string | The client-generated file transfer session ID. Generate any ASCII string for sharing this information between the two people engaged in the file transfer. This value is generated only by the client that initiates the invite action of the file transfer handshake and is then utilized by all subsequent actions of the handshake. This value needs to be unique across all file transfer invitations within a session. Maximum of 128 bytes. |
fileName
|
string | The file name. Maximum of 1024 bytes. |
relayIP
|
string | The relay server IP address. Clients need to resolve the FQDN ftrelay.messenger.yahooapis.com and use any of the IP addresses returned in the lookup as the relayIP. The relayIP is generated by the client that initiates the send action of the handshake and is passed back by the client that initiates
the receive action of the handshake.
|
token
|
string | The token value received in the send notification |
files
|
array (max size = 10) |
An array of objects that contains:
|