OSCAR Protocol Overview for Developers
OSCAR Protocol Overview for Developers
A single user can use multiple clients at the same time on the same or different devices. When
building a client, or library, care should be taken to deal with a single user being online multiple
times. In general, all IMs and Buddy notifications will be sent to all instances, although there are
some IM routing rules that come into effect when users are away or idle.
Introduction
Datatypes
UUIDs
FLAP
SNAC
ERRORs
Foodgroups
OSERVICE
Rate Limiting
Migration
Secondary Service Requests
Miscellaneous
PD - Permit/Deny
ICBM - Inter Client Basic Message
INVITE - Invite users to join AIM
BUDDY - Presence
FEEDBAG - Host Based Buddy List & Preferences
BART - Buddy Art
LOCATE - Get Info
Authentication
Single Signon to Web Pages
Start Page Requirement
Expressions Requirement
Examples
Signon Flow
IM Flow
Buddy Info Requirement
Start Page and Expression Chooser
Base Types
Name Size Notes
u08 1 byte Unsigned byte
u16 2 bytes Unsigned two byte short
u32 4 bytes Unsigned four byte int
f32 4 bytes Four byte float
t70 4 bytes Unsigned four byte timestamp, from UNIX EPOCH
UUID 16 bytes Sixteen bytes that represent a UUID also known as a GUID
blob length bytes Used in a TLV, data type and size is defined by external values
empty 0 bytes Used in a TLV, existence of tag causes behavior, the data is ignored
String Types
In general strings are not NULL terminated and are encoded using UTF8. A string is said to
be compressed if all white spaces are removed and all upper case characters are converted to lower
case.
Name Size Notes
string data Inside of TLVs a string inherits its length from the TLV length
string08 u08 + data One byte length followed by that many bytes of data
string16 u16 + data Two byte length followed by that many bytes of data
Datatype: TLV
TLVs are a very common structure used in the OSCAR protocol to represent dynamically typed
data. Parsers should always ignore unknown tags as to not break old clients when new protocol
items are added. Possible values for tags are determined by where the TLV is in the protocol; these
possible values belong to a TLV class. In the wild, the term type is sometimes used interchangeably
with tag, however this document uses tag to reference the integer value associated with the TLV and
type as the datatype associated with that tag.
Name Type Notes
Numeric tag of the data, possible values are defined in the TLV class for the group of
tag u16
TLVs
len u16 Length in bytes of the variable data
The data inside the TLV of len length; usually another datatype is used to represent
value blob
the data - this is described in the TLV class
TLVs are usually used in an array of TLV form, allowing the protocol to easily be expanded.
Having just one TLV without an array does not gain much since it only allows one item to be
described. There are two common methods for adding an array of TLVs to datatypes and SNACs.
An additional method also exists to add an array of TLVs to SNACs. The most common is a
tlvBlock which is a u16 number of TLVs followed by that many TLVs. The less common is a
tlvLBlock which instead of counting the number of TLVs, counts the size of all the TLVs. The third,
which is only available in SNACs, is the tlvRestBlock which says any remaining bytes in the SNAC
are TLVs.
Name Size Notes
tlvBlock u16 + data Two byte number of elements, followed by that many elements
tlvLBlock u16 + data Two byte length of elements, followed by that many bytes of elements
Datatype: FLAP__Header
The header contains the frame type, a sequence number, and the length of the following data
segment. The sequence number is independently sequential in each direction. Packets from the
server to client have one sequence number, while the packets from the client to server have a
different independently increasing number. If the server receives a sequence number out of order it
will terminate the connection. A common mistake is to use a u08 to represent the sequence number,
which will roll over at 255 and cause the server to disconnect the client.
Name Type Notes
startMarker u08 ASTERISK (literal ASCII ‘*’)
frameType u08 [Class: FLAP__FRAME_TYPE] Frame type
sequenceNumber u16 Initialized to a random value, increments for each send
payloadLength u16 Length of data, does not include the 6 byte header length
Class: FLAP__FRAME_TYPE
There are several different frame types, with the most common being the DATA frame.
Name Value Notes
SIGNON 1 Initialize the FLAP connection
DATA 2 Messages using the FLAP connection, usually a SNAC message
ERROR 3 A FLAP error - rare
SIGNOFF 4 Close down the FLAP connection gracefully
KEEP_ALIVE 5 Send a heartbeat to server to help keep connection open
Class: FLAP__MULTICONN_FLAGS
These flags control how multiple instances are handled by the servers and if current sessions need to
be bumped off when a new session signs on.
Name Value Notes
OLD_CLIENT 0x00 Don't use
RECENT_CLIEN
0x01 This is a recent client that understands multiple instances
T
This is a recent client that understands multiple instances but does not
SINGLE 0x03
want them
FLAP: FLAP__SIGNON_FRAME
On connection, the server and client each send a FLAP SIGNON frame to initialize the connection.
The sequence number field should be initialized with a random value. The data portion of the frame
contains a 4 byte version number, currently always 1, followed by any TLVs that are required.
Name Type Notes
FLAP header, type will be
header FLAP__Header
FLAP__FRAME_TYPE_SIGNON
flapVersion u32 Always 1
Array of TLV length
tlvs [Class: FLAP__SIGNON_TAGS] TLVs
payloadLength-4
Example in hex: 2a011234000400000001
FLAP: FLAP__KEEPALIVE_FRAME
Many modern operating systems and networks come with firewalls and packet inspectors to protect
the user. Unfortunately, these services and devices have proven to be buggy with long lived
connections. We recommend that a client sends a FLAP KEEP_ALIVE packet to the server every
minute after the connection has gone idle to help keep the connection alive. Please do not send it
more often then once a minute or when the connection is not idle. There is no response to this
message and a client will never receive a KEEP_ALIVE packet from the server.
Name Type Notes
header FLAP__Header FLAP header, type will be FLAP__FRAME_TYPE_KEEP_ALIVE
FLAP: FLAP__DATA_FRAME
A data frame will always just contain a single SNAC.
Name Type Notes
header FLAP__Header FLAP header, type will be FLAP__FRAME_TYPE_KEEP_DATA
snacHeader SNAC__Header SNAC header
snac blob snac described by the SNAC header
FLAP: FLAP__SIGNOFF_FRAME
This FLAP frame type is sent both to the client and server.
Sent to the client to tell it that it is getting bumped off gracefully. The client should NOT try
to auto reconnect if it receives one of these messages.
Sent to the server by the client to tell it that it is going away gracefully.
Name Type Notes
header FLAP__Header FLAP header, type will be FLAP__FRAME_TYPE_SIGNOFF
Datatype: SNAC__Header
The FLAP Header will be immediately followed by the SNAC Header that describes what type of
message it is for SNAC messages sent over FLAP. The SNAC Header is a simple 10 byte header
that contains the foodgroup, type, any high level flags, and the requestId. The requestId is used to
link up requests and replies and can also be used to determine the direction of traffic. A client
should never set the high bit of a requestId or use 0. The server will always set the high bit for its
requestId unless it is a reply to a client query, in which case it will use the same requestId as the
request. The flags field tells the client if for the same request there will be multiple replies and if
there are any SNAC Header TLVs.
Name Type Notes
id SNAC__ID Foodgroup and message type
[Class: SNAC__HEADER_FLAGS] Flag
flags u16
s
requestId u32 Used to link requests and replies
Datatype: SNAC__ID
Describes the foodgroup and type this SNAC represents
Name Type Notes
foodgroup u16 Numeric value that represents the foodgroup the SNAC is in
type u16 Numeric value that represent the SNAC type
Class: SNAC__HEADER_FLAGS
These are the flags that let the client know details about the SNAC being received.
Name Value Notes
OPT_TLV_PRESE A tlvLBlock immediately follows the SNAC header before the rest of
0x8000
NT the fields
MORE_REPLIES_ More replies follow this message using the same requestId; the last
0x0001
FOLLOW reply is easily detectable because it will not have this flag set
Errors
Errors are implemented in a common way for all foodgroups each having a SNAC as type 1.
Class: ERROR__CODE
Generic error codes
Name Value Notes
INVALID_SNAC 1 Not a known SNAC
RATE_TO_HOST 2 Exceed the rate limit to server
RATE_TO_CLIENT 3 Exceed the rate limit to the remote user
NOT_LOGGED_ON 4 Remote user is not logged in
SERVICE_UNAVAILABLE 5 Normally available but something is wrong right now
SERVICE_NOT_DEFINED 6 Requested a service that does not exist
OBSOLETE_SNAC 7 This SNAC is known no longer supported
NOT_SUPPORTED_BY_HOS
8 Unknown SNAC
T
NOT_SUPPORTED_BY_CLIE
9 Remote user is on but does not support the request
NT
REFUSED_BY_CLIENT 10 Message is bigger then remote client wants
RESPONSES_LOST 12 Something really messed up
REQUEST_DENIED 13 Server said user or client is not allowed to do this
BUSTED_SNAC_PAYLOAD 14 SNAC is too small or is not in the right format
User or client does not have the correct rights to make the
INSUFFICIENT_RIGHTS 15
request
User is trying to interact with someone blocked by their
IN_LOCAL_PERMIT_DENY 16
own settings
TOO_EVIL_SENDER 17 Sender is too evil
TOO_EVIL_RECEIVER 18 Receiver is too evil
USER_TEMP_UNAVAIL 19 User is migrating or the server is down
NO_MATCH 20 Item was not found
LIST_OVERFLOW 21 Too many items were specified in a list
REQUEST_AMBIGOUS 22 Host could not figure out which item to operate on
TIMEOUT 26 Some kind of timeout
GENERAL_FAILURE 28 General failure
RESTRICTED_BY_PC 31 Restricted by parental controls
REMOTE_RESTRICTED_BY_
32 Remote user is restricted by parental controls
PC
Foodgroup: OSERVICE
The OSERVICE foodgroup contains basic operations and data types that are common across many
of the foodgroups and even different servers. It is also used for service requests when the client
needs to connect to a second server to perform some other action.
Datatype: OSERVICE__NickwInfo
Common data structure that contains a user's loginId and information about their session.
Name Type Notes
displayId string08 Formated loginId
evil u16 Warning level of user
[Class: OSERVICE__NICK_INFO_TAGS] TLV Block of user
userAttributes tlvBlock
attributes
Class: OSERVICE__NICK_FLAGS
Bits specifying a user's characteristics; For compatibility reasons the lower 2 bytes of
NICK_FLAGS are sent in the NICK_FLAGS tag, while the upper bytes are sent in the
NICK_FLAGS2 tag. To form the full nick flags the client needs to combine NICK_FLAGS and
NICK_FLAGS2 shifted to the left 2 bytes. NICK_FLAGS is always a u16, which NICK_FLAGS2
can be any size. Another way to express the math: nickFlags = NICK_FLAG | (NICK_FLAGS2 <<
16)
Name Value Notes
UNCONFIRMED 0x0001 Unconfirmed account
AOL 0x0004 AOL user
AIM 0x0010 AIM user
UNAVAILABLE 0x0020 User is away
ICQ 0x0040 ICQ user; AIM bit will also be set
WIRELESS 0x0080 On a mobile device
IMF 0x0200 Using IM Forwarding
BOT 0x0400 Bot user
ONE_WAY_WIRELE
0x1000 One way wireless device
SS
NO_KNOCK_KNOC Do not display the "not on your Buddy List" knock-knock as
0x00040000
K the server took care of it or the sender is trusted
FORWARD_MOBIL
0x00080000 If no active instances forward to mobile
E
Datatype: OSERVICE__Version
Description of a foodgroup and the version of that foodgroup the client wants to use when
communicating with the backend.
Name Type Notes
foodgroup u16 Foodgroup that the version represents
Version of the foodgroup implementation; should be 4 for OSERVICE, 3 for
version u16
FEEDBAG, 1 for all others
tool_id u16 Should be 41 for all Open AIM clients
tool_versio
u16 Any version number the developer would like, usually the build number
n
Rate Limiting
To protect the server and other users from abusive clients, the server implements SNAC rate
limiting. Rate limiting is done with a simple formula that calculates the average time between
SNACs over the last few SNACs sent from the client to the server. A client can optionally subscribe
to notifications about its rates so that it can warn the user ahead of time or show UI about the rates.
Even if the client does not subscribe, it will receive notifications when the rate limit has been
reached and the server has started dropping SNACs. If the client continues to send SNACs, it will
eventually be disconnected.
All SNACs are assigned to a Rate Class which controls the parameters to the rate limit forumla.
Most SNACs are in the most lenient rate class by default, with SNACs like IM sending being in
more strict classes. The rate formula is currentAvg = ((currentAvg * (windowSize -1)) +
delta)/windowSize. The currentAvg falling below certain thresholds causes the server to warn the
client that it is about to be rate limited or disconnected. Once a client is rate limited, its average has
to fall above the clear threshold before it can start sending SNACs again.
The actual parameters for the formula are not published in this document since they can change
from time to time and are different depending on the current warning level and other things. A client
can average around one IM every two seconds without being rate limited.
SNAC: OSERVICE__RATE_PARAMS_QUERY - Foodgroup:1 Type:6
This SNAC is sent by the client to query for the current rate limit parameters.
This SNAC has no fields and is always empty.
Datatype: OSERVICE__Rate_Parameters
Describes the rate parameters for a single rate class.
Name Type Notes
classId u16 Rate class being described
windowSize u32 Number of events to count
clearThreshold u32 Once rate limited the average has to reach this value in order to clear
alertThreshold u32 Server will tell the client it is getting close to the limit
limitThreshold u32 SNACs will be dropped below this value
disconnectThreshold u32 Server will disconnect below this value
currentAverage u32 Current value for the class; higher is better
The maximum rate value; if the current value rises about this value it
maxAverage u32
should be reset
lastArrivalDelta u32 Last message was received this long ago
droppingSNACs u08 Is the server dropping SNACs for this rate class
Datatype: OSERVICE__Rate_Class_Members
Describes all the SNACs in a single rate class.
Name Type Notes
id u16 Rate class being described
numMembers u16 Number of SNACs in this rate class
snacIds Array of SNAC__ID length numMembers SNACs in this rate class
Class: OSERVICE__RATE_CODE
These are the codes used in RATE_PARAM_CHANGE to describe the state of the rate class.
Name Value Notes
CHANGE 1 Rate parameters have changed
Rate limit warning reached; if client does not slow down LIMIT state will be
WARNING 2
hit
LIMIT 3 Rate limit reached; if client does not slow down client will be disconnected
CLEAR 4 Rate limit cleared; client can send SNACs normally now
Migration
The AIM backend supports the concept of migration so AOL can perform maintenance to backend
servers without effecting a user's sessions. The server will initiate the migration and tell the client it
needs to migrate to a different server. The client acknowledges that it is ready to be migrated to the
server. The server then tells the client where to reconnect to start its session up again.
Class: OSERVICE__SERVICE_RESPONSE_SSL_STATE
This describes what type of SSL connection the client and backend have.
Name Value Notes
NOT_USED 0 SSL is not supported or not requested for this connection
USE 1 SSL is being used
RESUME 2 SSL is being used and SSL resume is supported if desired
TLV Class: OSERVICE__SERVICE_RESPONSE_TAGS
This class provided information about where the client should connect for the service.
Name Tag Type Notes
GROUP_ID 13 u16 Foodgroup for which this response is for
RECONNECT_HER
5 string IP address followed by optional colon and port, [Link]:5190
E
LOGIN_COOKIE 6 string Binary opaque data
SSL_CERTNAME 141 string Certname to use for SSL validation
[Class:OSERVICE__SERVICE_RESPONSE_SSL_STATE] SS
SSL_STATE 142 u08
L state
Miscellaneous
SNAC: OSERVICE__NICK_INFO_QUERY - Foodgroup:1 Type:14
This is a query to find out one's current info. The server will send a NICK_INFO_UPDATE.
This SNAC has no fields and is always empty.
Class: BUDDY__RIGHTS_QUERY_FLAGS
These are the flags the client uses to inform the server what kinds of features it supports.
Name Value Notes
BART_SUPPORTED 0x0001 Want to receive BART items
Want to receive ARRIVE/DEPART for all users on a Buddy
INITIAL_DEPARTS 0x0002
List, even those offline
OFFLINE_BART_SUPPO Want to receive BART items for offline buddies, excluding
0x0004
RTED location
REJECT_PENDING_BU If set and INITIAL_DEPARTS is set, use REJECT on pending
0x0008
DDIES buddies instead of DEPART
Foodgroup: PD
The PD foodgroup is used for the control of Permit/Deny settings for the user
Foodgroup: LOCATE
The LOCATE foodgroup allows the discovery and setting of personalization features such as AIM
signatures and away messages. The AIM signature has been surfaced under many different names in
AIM products, such as AIM Profile, AIM Buddy Info, and AIM Get Info.
Class: LOCATE__QUERY_TYPE
This class specified which fields the client wants returned when doing a USER INFO QUERY2.
Name Value Notes
SIG 0x00000001 The AIM signature
UNAVAILABLE 0x00000002 The away message
CAPABILITIES UUID array; short caps will be represented in
CAPABILITIES 0x00000004
long form
CERTS 0x00000008 The CERT Blob
HTML_INFO 0x00000400 Return HTML formatted Buddy Info page
Datatype: LOCATE__NickwInfo_Email
This is the data structure that makes it easy to link a NickwInfo and an email address.
Name Type Notes
info OSERVICE__NickwInfo Info for loginId that matched the email address
email string16 Email address requested
Foodgroup: ICBM
ICBM, or Inter Client Basic Message, is a foodgroup focused around protocol messages that are
sent between users or clients.
Name Size Notes
ICBM__Cookie 8 byte Opaque data used to link conversations
Class: ICBM__CHANNELS
Messages sent between users are sent on a specific channel that narrow down how they should be
processed and possible rate size parameters.
Name
Value Notes
IM 1 Normal IM channel; all clients are expected to understand this channel
RENDEZVOUS 2 For rendezvous negotiations and sending data between clients
Class: ICBM__PARAMETER_FLAGS
These are flags the client uses to inform the server what kinds of features it supports for the ICBM
channel.
Name Value Notes
CHANNEL_MSGS_ALLOW
0x00000001 Wants ICBMs on this channel
ED
MISSED_CALLS_ENABLE
0x00000002 Wants MISSED_CALLS on this channel
D
EVENTS_ALLOWED 0x00000008 Wants CLIENT_EVENTs
SMS_SUPPORTED 0x00000010 Aware of sending to SMS
OFFLINE_MSGS_ALLOWE Support offline IMs; client is capable of storing and
0x00000100
D retrieving
Class: ICBM__ERROR_SUBCODE
These are subcodes used with standard errors.
Name Value Notes
REMOTE_IM_OFF 1 Used with NOT_LOGGED_ON
REMOTE_RESTRICTED Used with NOT_LOGGED_ON; the remote side denied
2
_BY_PC because of parental controls
NEED_SMS_LEGAL_TO User tried to send a message to an SMS user and is required to
3
_SEND accept the legal text first
SMS_WITHOUT_DISCL Client tried to send a message to an SMS user without the
4
AIMER character counter being displayed
SMS_COUNTRY_NOT_A Client tried to send a message to an SMS user but the SMS
5
LLOWED matrix said the country code combination not permitted
SMS_UNKNOWN_COUN Client tried to send to an SMS user but the server could not
8
TRY determine the country
CANNOT_INITIATE_IM 9 An IM cannot be initiated by a BOT
IM_NOT_ALLOWED 10 An IM is not allowed by a consumer BOT to a user
CANNOT_IM_USAGE_L An IM is not allowed by a consumer BOT due to reaching a
11
IMITED generic usage limit, not common
CANNOT_IM_DUSAGE_ An IM is not allowed by a consumer BOT due to reaching the
12
LIMITED daily usage limit
CANNOT_IM_MUSAGE_ An IM is not allowed by consumer BOT due to reaching the
13
LIMITED monthly usage limit
OFFLINE_IM_NOT_ACC
14 User does not accept offline IMs
EPTED
OFFLINE_IM_EXCEED_
15 Exceeded max storage limit
MAX
Class: ICBM__IM_SECTION_ENCODINGS
An IM can be encoded in the following different forms:
Name Value Notes
ASCII 0 ANSI ASCII -- ISO 646
UNICODE 2 ISO [Link]-2 Unicode
LATIN_1 3 ISO 8859-1
Datatype: ICBM__IM_SECTION
An IM can be broken up into multiple sections and encodings. Most clients do not do this anymore
and use a single section; however old AOL clients did this to save bandwidth. :) Anyone remember
those days?
Name Type Notes
encoding u16 [Class: ICBM__IM_SECTION_ENCODINGS] Encoding of the data
language u16 Language of the data for old clients; new clients should just use 0
The IM text; array of u16 if encoding is
data blob
ICBM__IM_SECTION_ENCODINGS_UNICODE, otherwise u08
Class: ICBM__RENDEZVOUS_MESSAGE
This is a type of rendezvous/data message.
Name Value Notes
PROPOSE 0 Propose a rendezvous
CANCEL 1 Cancel a proposal you generated
ACCEPT 2 Accept a proposal someone else generated
Class: ICBM__RENDEZVOUS_CANCEL_REASONS
These are the reasons a proposal is cancelled.
Name Value Notes
UNKNOWN 0 Reason not specified
USER_CANCEL 1 Recipient user declined
TIMEOUT 2 Timeout
ACCEPTED_ELSEWHERE 3 Proposal was accepted by a different instance of the user
Datatype: ICBM__IM_RENDEZVOUS
There are three different types of rendezvous messages - propose, cancel, and accept.
PROPOSE
This is the message that a client sends to the server to propose a rendezvous with another
client. The tag values to be used in the TLV are the ones specified in
RENDEZVOUS_TLV_TAGS. Proposals typically specify either a
RENDEZVOUS__CHANNEL or a RENDEZVOUS_IP_ADDR/PORT pair. If neither is
specified, the systems which are rendezvousing must know out-of-band how to connect to
each other (e.g., a server IP_ADDR compiled into a third party client). If specifying
RENDEZVOUS_IP_ADDR, the client may also specify PROPOSER_IP_ADDR which is the
IP address that it identifies itself by, as found by a call to get_local_host. If
PROPOSER_IP_ADDR is used, VERIFIED_IP_ADDR is added by the server before sending
the RENDEZVOUS_PROPOSAL_TO_CLIENT. VERIFIED_IP_ADDR may not be
specified by the client in RENDEZVOUS_PROPOSAL_TOHOST. Likewise, if
DOWNLOAD_URL is specified and the service UUID matches a well known service, the
server may add VERIFIED_DOWNLOAD_URL. The client may not specify
VERIFIED_DOWNLOAD_URL itself.
Additionally, the client can send any tags specific to a given service as long as the tag values
fall outside the reserved range defined above.
NOTE: Reserved tag values MUST be at the beginning of the TLV. The server will stop
parsing the TLV as soon as it encounters the first non-reserved tag.
CANCEL
This message is sent by the sender of a RENDEZVOUS_PROPOSAL_TOCLIENT in order
to indicate a desire to cancel the rendezvous. Note that due to timing issues, the cancel may
arrive at the other client after the other client has acted on the rendezvous proposal. In other
words, cancel is an advisory message only. The sender should take other precautions to
prevent a rendezvous attempt from succeeding (e.g., shut down any systems which are
listening, etc.).
ACCEPT
This message is sent by the recipient of a PROPOSE in order to indicate that it has completed
the rendezvous. It may contain modifications to the original PROPOSE TLVs indicating
different levels of feature support (e.g., version negotiation).
Class: ICBM__EVIL_REQUEST_FLAGS
These are the flags that control how EVIL should work.
Name Value Notes
ANONYMOUS 0x0001 Do not reveal my loginId to the evilee.
Class: ICBM__MISSED_CALL_REASONS
These are the reasons sent to a receiver why they could not receive an IM from a sender.
Name Value Notes
TOO_LARGE 0x0001 Sender's message was too large
RATE_EXCEEDED 0x0002 Sender exceeded the receiver's rate limit
EVIL_SENDER 0x0004 Message rejected because sender is EVIL
EVIL_RECEIVER 0x0008 Message rejected because receiver is EVIL
Datatype: ICBM__Missed_Call
This represents a single missed IM from a sender, sent to the potential receiver.
Name Type Notes
channel u16 Channel on which the missed message was
OSERVICE__NickwInf
senderInfo Information about the sender
o
numMissed u16 How many messages were dropped
[Class: ICBM__MISSED_CALL_REASONS] Why the IM
reason u16
failed
Class: ICBM__RENDEZVOUS_NAK
Sent in ICBM__CLIENT_ERR errorInfo field
Name Value Notes
PROPOSAL_UNSUPPORTED 0 Proposal UUID not supported
PROPOSAL_DENIED 1 Not authorized, or user declined
PROPOSAL_IGNORED 2 DO NOT USE; 'ignores' should no-op
BUSTED_PARAMETERS 3 Proposal malformed
PROPOSAL_TIMED_OUT 4 Attempt to act on proposal (e.g. connect) timed out
ONLINE_BUT_NOT_AVAILABLE 5 Recipient away or busy
INSUFFICIENT_RESOURCES 6 Recipient had internal error
RATE_LIMITED 7 Recipient was ratelimited
NO_DATA 8 Recipient had nothing to send
VERSION_MISMATCH 9 Incompatible versions
SECURITY_MISMATCH 10 Incompatible security settings
SERVICE_SPECIFIC_REASON 15 Service-specific reject defined by client
Class: ICBM__CLIENT_ERRORS
The following are Inter-Client error codes.
Name Value Notes
UNSUPPORTED_CHA
1 Receiving client does not understand the channel
NNEL
BUSTED_ICBM_PAYL
2 Receiving client thinks the payload is busted
OAD
CHANNEL_SPECIFIC_ See ICBM__RENDEZVOUS_NAK which will be inside the
3
ERROR errorInfo for values for ICBM__CHANNEL_RENDEZVOUS
Class: ICBM__EVENTS
These are the codes used in the CLIENT_EVENT SNAC.
Name Value Notes
NONE 0 Default state; only sent if the user was typing but erased the message
TYPED 1 Indicates that the user was typing but has stopped for at least 2 seconds
Indicates the message is being actively composed; only send once when
TYPING 2
switching to this state, do NOT send for every character
RESERVED 3 Reserved
Indicates that the user closed the IM window; can be an issue in multiple
CLOSED 15
instance environments
Foodgroup: INVITE
This is the foodgroup for inviting users to join AIM.
Foodgroup: FEEDBAG
A Feedbag is the stored Buddy List and server based preferences for an AIM user. The client has
direct access to manipulate the Feedbag in any way it sees fit, including corrupting it. The server
has some checks in place to prevent destruction, but a client developer must be careful not to
corrupt things.
Class
All the entries in the Feedbag are assigned a class, which defines the characteristics of how
they should behave. The class is represented by a numeric classId with each entry.
Item
An item is a generic term that is used for any entry that can be added to a user's Feedbag. An
item can be a group, a Buddy, a preference, a permit/deny entry, or anything else. All items
have a name (which can be empty), a groupId, an itemId, a classId, and attributes with
groupId and itemId being unique. The groupId and itemId can have values between 0 and
32767; values between 32768 and 65535 are reserved. The client is responsible for picking
new groupId and itemIds.
Group
A group is a special type of item that is always represented by using an itemId of 0 and classId
of GROUP. All items live inside of a group, with items that use a groupId of 0 being called in
the Root Group. All group items have an ORDER attribute that describes how the items in the
group should be ordered, since the order in Feedbag can be random.
Sample:
groupId itemId classId Name Attributes
0 0 GROUP(0) ORDER(200):321 10
0 1805 DENY(3) spimmer123
0 4046 BART(20) 5 BART_INFO(213): 00052b000013b9
PD_MODE(202): 04
0 12108 PDINFO(4) PD_MASK(203): ffffffff
PD_FLAGS(204): 00000001
10 0 GROUP(1) Friends ORDER(200): 110 147
10 110 BUDDY(0) ChattingChuck
10 147 BUDDY(0) example@[Link]
321 0 GROUP(1) Empty Group ORDER(200):
Feedbag Implementation Notes
Basics
A Feedbag consists of zero or more items. Feedbags are interpreted by the server and the client. All
strings in Feedbag are UTF8 encoded.
It is mandated that only users or the server shall delete information from the user's Feedbag. A client
may not delete, or "forget", information if it does not support or recognize the information; deleting
corrupt items is permitted.
For instance, a user loads a special Buddy tagging plugin on a machine at home but does not have
this plugin at work. Changes made to the user's Feedbag (aka, Buddy List) at work shall not delete
(or "forget") the user's Buddy tagging plugin attributes from the Feedbag.
Finally, subject to the rules outlined below, all items in the Feedbag are optional. If a client does not
see an item or attribute on an item, it should adopt a sensible default. For example, if the PDINFO
item is not present, the client should assume permit-all mode.
Root Group
In any Feedbag that contains groups there should exist a 'root group' that has an empty name, group
id 0, item id 0, and a class id 1 (GROUP). This root group contains the group ordering in an
ORDER attribute. If the root group does not exist and a group is to be added, the client should
create the root group first. The Root Group should never be deleted by the client.
Note that some classes of items can only be in the root group and some classes of items can only be
in regular groups. For example, buddies can only be in regular groups but permit/deny entries can
only be in the root group. See the class enumerations for more information where items can exist.
Ordering of Feedbag
For a FEEDBAG__REPLY, the items in the Feedbag are guaranteed to be ordered. They are sorted
by group id and then by item id. Thus, the root group is first, followed by groupless items (permits,
denies, etc.), followed by the group with the lowest group id, followed by its items, followed by the
next group, etc.
Naming rules
The root group must have "" for its name.
Regular groups must have unique names independent of case (e.g., if you have a group "abc", you
can also have "a b c" but not "aBc"). This is the way the old client worked, so we need to keep it
this way.
Items in the root group must have unique compressed names for their class (e.g., if you have an
item "abc" with class==PERMIT, you cannot have "aBc" or "a b c" with class==PERMIT, but you
could have "abc" with class==DENY).
Classes limited to a single item, such as Buddy-prefs and pdinfo, should have "" for the name of the
item.
Items in groups must have unique compressed names in the group (e.g., if you have a Buddy "abc"
in a group, you cannot have a Buddy "a bc").
Preventing corruption
In an effort to prevent corruption of the order attribute, when the client adds a Buddy/group, the
client should only send the INSERT/UPDATE for the group/root after the INSERT for the
Buddy/group returns its STATUS. This way if there is a failure, the ORDER can be fixed before it is
sent in the INSERT/UPDATE. In cases where a group and a Buddy are added, this can mean
sending the Buddy INSERT, waiting for the STATUS, sending the group INSERT, waiting for the
STATUS, then sending the root INSERT/UPDATE.
Optimizations
The client should strive to optimize its transactions with the server. This means that even if several
item attributes are changed by the user, the client should send only one UPDATE_ITEM.
Additionally, the client should avoid sending redundant transactions such as an INSERT followed
by an UPDATE (the INSERT alone will be sufficient) or an INSERT followed by a DELETE
(nothing should be sent), or an UPDATE followed by a DELETE (just send the DELETE).
Class: FEEDBAG__RIGHTS_QUERY_FLAGS
These are the flags used in FEEDBAG__RIGHTS_QUERY to determine how Feedbag is treated.
Name Value Notes
INTERACTION_SUPPORTED 0x0001 Client supports interactions
AUTHORIZATION_SUPPORTED 0x0002 Client supports Buddy authorization
DOMAIN_SN_SUPPORTED 0x0004 Client supports a@[Link]
ICQ_NUM_SUPPORTED 0x0008 Client supports 1234567890
SMS_NUM_SUPPORTED 0x0010 Client supports +17035551212
ALIAS_ATTR_SUPPORTED 0x0020 Client supports alias attribute
SMARTGRP_SUPPORTED 0x0040 Client supports smart groups
Datatype: FEEDBAG__INTERACTION_INFO
The server tracks the last interaction time and generates a score with time decay for a frequency
display.
Name Type Notes
lastUpdate t70 The last interaction with this Buddy
score f32 The score; higher means more interactions
Class: FEEDBAG__CLASS_IDS
Class index constants:
(R) means items of class should only be in the root group
(G) means items of class should only be in regular groups
(B) means items of class can be anywhere
Name Value Notes
BUDDY 0 (G) Names for Buddy List
GROUP 1 (R) Group Name
PERMIT 2 (R) Names for Permit List
DENY 3 (R) Names for Deny List
PDINFO 4 (R) PDMODE/PDMASK/PDFLAGS
BUDDY_PREFS 5 (R) Buddy List preferences
(R) Users not in the Buddy List; use this to store aliases or other
NONBUDDY 6
information for future use
(R) Client-specific preferences; name is name of client, e.g., "AIM
CLIENT_PREFS 9
Express"
(R) Timestamp; when a record of this class is inserted or updated in the
Feedbag, the server always adds a TIME_T attribute (overriding any
DATE_TIME 15 that may have been provided) containing the current date and time (or
one second greater than the old value, if required to keep the value
increasing)
BART 20 (R) BART IDs; name is the BART Type
(R) Order attribute lists recent buddies in the least to most recently used
RB_ORDER 21
order
PERSONALITY 22 (R) Collection of BART ids
AL_PROF 23 (R) Information about Account Linking prefrences
AL_INFO 24 (R) Account linking information
INTERACTION 25 (R) Non-Buddy interaction record
VANITY_INFO 29 (R) Vanity information kept at user logoff
FAVORITE_LOCA
30 (R) User's favorite locations
TION
BART_PDINFO 31 (R) BART PDMODE
CUSTOM_EMOTI
36 ICQ Custom Emoticons with BART_LIST attributes
CONS
MAX_PREDEFIN
36 Dummy value; Set to highest used ID
ED
MIN 1024 (B) Values above this are valid indexes
Class: FEEDBAG__PD_MODE
The permit deny system can be in the following different modes.
Name Value Notes
PERMIT_ALL 1 Allow anyone
DENY_ALL 2 Deny everyone
PERMIT_SOME 3 Permit folks listed
DENY_SOME 4 Deny folks listed
PERMIT_ON_LIST 5 Allow folks on the Buddy List
Class: FEEDBAG__WEB_PD_MODE
These are the different modes that control anonymous web queries.
Name Value Notes
Only show my anonymous queries on web pages when user is in Allow All
PD_MODE 0
or Deny Some mode [DEFAULT]
PERMIT_AL
1 Permit anonymous queries always
L
DENY_ALL 2 Deny anonymous queries always
Class: FEEDBAG__PD_FLAGS
This class changes how the permit deny settings work.
Name Value Notes
The permit/deny settings should apply also to the IM permit/deny settings.
If not set, the IM permit/deny settings can be different and is controlled by
APPLIES_IM 0x0001
sending IMs to $im_off & $im_on. This is turned on for AIM users no
matter the setting.
HIDE_WIRE
0x002 Hide the fact that the user is on a wireless device from other users
LESS
Class: FEEDBAG__BUDDY_PREFS
These are all the server based preferences and their defaults.
Name Value Notes
DISPLAY_LOGIN 0 [1] Whether or not to display Buddy List at login
DISPLAY_EBUDDY 1 [1] Whether or not to display the EBuddy group
PLAY_ENTER 2 [1] Whether or not to play a sound when a Buddy enters
PLAY_EXIT 3 [1] Whether or not to play a sound when a Buddy exits
VIEW_IMSTAMP 4 [1] Whether or not to display the timestamp in IMs
VIEW_SMILEYS 5 [1] Whether or not to display :) as a graphic
ACCEPT_ICONS 6 [1] Accept Buddy icons
RESERVED 7 [1] Legacy pref
KNOCK_NONAOLIMS 8 [1] Want knock-knocks for IMs from non-AOL users
[1] Want knock-knocks for IMs from people not on your
KNOCK_NONLISTIMS 9
Buddy List
DISCLOSE_IDLE 10 [1] Let other users know if you are idle
ACCEPT_CUSTOMBART 11 [0] Accept non-official icons, chromes
ACCEPT_NONLISTBART 12 [0] Accept icon, chromes, from non-buddies (official
only)
ACCEPT_BGS 13 [1] Accept IM window backgrounds
ACCEPT_CHROMES 14 [1] Accept IM window chromes
ACCEPT_BLSOUNDS 15 [1] Accept Buddy List arrive/depart sounds
ACCEPT_IMSOUNDS 16 [1] Accept IM sounds
NO_SEE_RECENT_BUDDIES 17 [0] Use does not see RECENT BUDDIES group
ACCEPT_SMS_LEGAL 18 [0] User has accepted to SMS legal agreement
ENTER_DOES_CRLF 20 [0] Enter does not send IM
PLAY_IM_SOUND 21 [1] Play sound on IM receipt
DISCLOSE_TYPING 22 [1] Send typing notifications
ACCEPT_SUPERICONS 24 [1] Accept 'super-buddies'
ACCEPT_BLRICHTEXT 25 [1] Display rich-text screennames in Buddy List
REDUCE_IM_SOUND 26 [1] Attenuate IM sounds after first sound
CONFIRM_DIRECT_IM 27 [1] Confirm with local user before starting DIM
ONE_TABBED_IM_WINDOW 28 [1] Show all IMs in one tabbed window
BUDDYINFO_ON_MOUSEOV
29 [1] Popup information when mouse pauses above Buddy
ER
DISCLOSE_BUDDY_MATCHE
30 [1] Let other users know if they have Buddy matches
S
[0] For server use only; clients use
CATCH_IMS 31
CATCH_IMS_FOR_CLIENT
SHOW_FRIENDLY_NAME 32 [1] Show alias instead of screenname?
DISCLOSE_RADIO 33 [1] Buddies know when user listening to AOL radio
SHOW_CAPABILIITES 34 [1] Show capabilities in the Buddy List
SHOW_BUDDYLIST_FILTER 35 [1] Show Buddy List filter
SHOW_AWAY_IDLE 36 [1] Show away and idle buddies
SHOW_MOBILE 37 [1] Show mobile buddies
SORT_BUDDYLIST 38 [0] Keep Buddy List sorted A-Z
CATCH_IMS_FOR_CLIENT 39 [0] IM catcher window enabled?
NEW_MESSAGE_SMALL_NO
40 [1] show small notification after new message arrives
TIFICATION
NO_FREQUENT_BUDDIES 41 [0] User does not see FREQUENT BUDDIES group
BLOG_AWAY_MESSAGES 42 [0] Send away messages to journals ?
BLOG_AIMSIG_MESSAGES 43 [0] Send AIM signature to journals ?
BLOG_NOCOMMENTS 44 [0] User allows comments ?
FRIEND_OF_FRIEND 45 [0] Allow Friend of Friend queries
FRIEND_GET_CONTACT_LIS
46 [0] Allow friend to get my Buddy List
T
COMPAD_INIT 47 [0] ICQ Compad Init
[1] Send Buddy Feed; Young Teens(YT)/Kids Only(KO)
SEND_BUDDYFEED 48
- KO default to OFF
BLK_SEND_IM_WHILE_AWA
49 [0] Block send IM while away
Y
SHOW_BUDDYFEED 50 [1] Show What is New indicator
[0] Do not save vanity related information (IM sent, idle,
NO_SAVE_VANITY_INFO 51
etc.)
ACCEPT_OFFLINE_IM 52 [1] Accept Offline IMs
SHOW_GROUPS 53 [0] ICQ: Show buddies in groups ?
SORT_GROUP 54 [1] ICQ: Sort groups ?
SHOW_OFFLINE_BUDDIES 55 [1] ICQ: Show/Hide Offline Buddies
EXPAND_BUDDIES 56 [0] ICQ: Show multiline information on some buddies
[0] BUDDY FEED: Does the owner have third party
THIRD_PARTY_FEEDS 57
feeds
NOTIFY_RECEIVED_INVITE 58 [1] Notify at login about received AIMPages invitations
APF_AUTO_ACCEPT 59 [0] Auto accept AIMPages invitations
[0] If APF_AUTO_ACCEPT and
APF_AUTO_ACCEPT_BUDDY 60 APF_AUTO_ACCEPT_BUDDY, auto accept invites
only from buddies
BLOCK_AWAY_MSG_FEED 61 [0] Block feed storage for away messages
BLOCK_AIM_PROFILE_FEED 62 [0] Block feed storage for AIM Profiles
BLOCK_AIM_PAGES_FEED 63 [0] Block feed storage for AIM Pages
BLOCK_JOURNALS_FEED 64 [0] Block feed storage for AOL Journals
BLOCK_LOCATION_FEED 65 [0] Block feed storage for Location data
BLOCK_STICKIES_FEED 66 [0] Block feed storage for Stickies
BLOCK_UNCUT_FEED 67 [0] Block feed storage for Uncut video
BLOCK_LINKS_FEED 68 [0] Block feed storage for Interesting Links
BLOCK_AIM_BULLETIN_FEE
69 [0] Block feed storage for AIM Bulletins
D
SAVE_STATUS_MSG 70 [1] Save status message
APF_NOTIFY_RECEIVED_IN
71 [0] Should email be sent when user invited ?
VITE_BY_EMAIL
SHOW_OFFLINE_GRP 72 [1] Show Offline group
OFFLINE_GRP_COLLAPSED 73 [0] Offline Group is collapsed
FIRST_IM_SOUND_ONLY 74 [0] Only play the sound on the first IM
IMBLAST_INVITE_NOTIFY 75 [1] ALLOWS IMSERV invite notify message
Class: FEEDBAG__BUDALERT_MASK
Masks for when to trigger Buddy alerts or pounces
Name Value Notes
WHEN_ONLINE 0x0001 Trigger when online
WHEN_NOTIDLE 0x0002 Trigger when no longer idle
WHEN_NOTAWAY 0x0004 Trigger when no longer away
DISPLAY_DIALOG 0x0100 Display dialog
PLAY_SOUND 0x0200 Play sound
Datatype: FEEDBAG__Item
This is a single Feedbag item.
Name Type Notes
name string16 UTF8 string of the item's name; maximum length of 97 characters
groupId u16 ID of the group of which the item is part
itemId u16 ID inside the group; if 0 then this is the definition of the group
[Class: FEEDBAG__CLASS_IDS] ID of the class of which this item is a
classId u16
member
[Class: FEEDBAG__ATTRIBUTES] All the attributes for the item; a group
attributes tlvLBlock
must contain the ORDER attribute
Class: FEEDBAG__STATUS_CODES
These are the status codes returned from database operations.
Name Value Notes
SUCCESS 0 Success
DB_ERROR 1 Some kind of database error
NOT_FOUND 2 Item was not found for an update or delete
ALREADY_EXISTS 3 Item already exists for an insert
UNAVAILABLE 5 Server or database is not available
BAD_REQUEST 10 Request was not formed well
DB_TIME_OUT 11 Database timed out
OVER_ROW_LIMIT 12 Too many items of this class for an insert
NOT_EXECUTED 13 Due to other error in same request
AUTH_REQUIRED 14 Buddy List authorization required
BAD_LOGINID 16 Bad loginId
OVER_BUDDY_LIMIT 17 Too many buddies
INSERT_SMART_GROUP 20 Attempt to added a Buddy to a smart group
TIMEOUT 26 General timeout
Foodgroup: BART
BART is the system that the AIM clients use to download expressions for their buddies and
themselves. Examples of BART items include Buddy icons, Buddy arrival sounds, and immersive
wallpapers. For some items, the actual assets are downloaded using the BART system and in other
cases, just descriptive XML files are used. Once a BART item is downloaded, it is basically cached
FOREVER by the client, so updating requires publishing a new BART item. This is especially
important when the BART item is an asset. When the BART item is a descriptive XML file, only
the XML file is cached forever and any assets it refers to can use different caching schemes
determined by the client.
All BART items are represented by a BART ID. A BART ID is a 5 byte to 20 byte binary value that
represents the BART item and is sent around by the client and the servers. One simple way to think
of the BART ID is as a compressed URL. When the client receives a BART ID, either from another
client or from the server, it checks its cache or uses the BART server to download the item. The
BART server also has a cache and connects to the various partners to download the assets if it does
not have them. It is expected that each BART ID points to a unique item. The backend will collapse
duplicate items into a single ID. The BART server also will store custom items for some asset types.
Having a Buddy icon with opaque data of 0x0201d20472 means the user has explicitly chosen to
have no Buddy icon. This is different then not having a Buddy icon. This ID should be treated
specially and does not need to be fetched from BART (although BART will return an empty GIF).
This was done so clients could tell when they upgraded from old style Buddy icons to BART Buddy
icons. This special ID should NOT be used for other BART types.
Class: BART__ID_FLAGS
These are the flags used by the client to detect how the BART ID should be processed.
Name Value Notes
CUSTOM 0x01 This is a custom blob; the opaque data will also be 16 bytes
The opaque field is really data the client knows how to process; these items
DATA 0x04
do not need to be downloaded from BART
Used in OSERVICE__BART_REPLY; BART does not know about this ID,
UNKNOWN 0x40
please upload
REDIRECT 0x80 Used in OSERVICE__BART_REPLY; BART says use this ID instead for the
matching type
Class: BART__ID_TYPES
These are all the different BART ID types that are known about and their restrictions.
Name Value Notes
BUDDY_ICON_SMALL 0 GIF/JPG/BMP, <= 32 pixels and 2k
BUDDY_ICON 1 GIF/JPG/BMP, <= 64 pixels and 7k
STATUS_STR 2 StringTLV format; DATA flag is always set
ARRIVE_SOUND 3 WAV/MP3/MID, <= 10K
RICH_TEXT 4 byte array of rich text codes; DATA flag is always set
SUPERBUDDY_ICON 5 XML
RADIO_STATION 6 Opaque struct; DATA flag is always set
BUDDY_ICON_BIG 12 SWF
STATUS_STR_TOD 13 Time when the status string is set
CURRENT_AV_TRACK 15 XML file; Data flag should not be set
DEPART_SOUND 96 WAV/MP3/MID, <= 10K
IM_CHROME 129 GIF/JPG/BMP wallpaper
IM_SOUND 131 WAV/MP3, <= 10K
IM_CHROME_XML 136 XML
IM_CHROME_IMMERS 137 Immersive Expressions
EMOTICON_SET 1024 Set of default Emoticons
ENCR_CERT_CHAIN 1026 Cert chain for encryption certs
SIGN_CERT_CHAIN 1027 Cert chain for signing certs
GATEWAY_CERT 1028 Cert for enterprise gateway
Datatype: BART__ID
This represents a BART asset and can be thought of as a "Tiny URL" equivalent. Some BART IDs
contain the data while some are pointers to the data and must be downloaded using the BART
server.
Name Type Notes
type u16 [Class: BART__ID_TYPES] Kind of asset this BART ID represents
[Class: BART__ID_FLAGS] Any flags associated with the BART item;
flags u08 DATA is important since it means the BART__ID holds the data and the
BART server is not needed
len u08 Length of the opaque data
Array of u08
opaque Opaque data; if the DATA flag is set then this is the actual data to use
length len
Datatype: BART__IDs_wName
This links a BART ID and a loginId.
Name Type Notes
loginId string08 User who is using the asset
numIds u08 Number of assets being requested
ids Array of BART__ID length numIds BART IDs to fetch
Datatype: BART__QUERY_REPLY_ID
This links a queried BART ID with an error code and a replyId.
Name Type Notes
queryId BART__ID Initial ID that is queried or used
[Class: BART__REPLY_CODES] Result code of the
code u08
query
replyId BART__ID ID that will be used; might be different then queryId
Class: BART__REPLY_CODES
These are the result codes of uploads, downloads, and queries.
Name Value Notes
SUCCESS 0 Operation was a success
INVALID 1 ID is malformed
NOCUSTOM 2 Custom blobs are not allowed for this type
TOSMALL 3 Item uploaded is too small for this type
TOBIG 4 Item uploaded is too big for this type
INVALIDTYPE 5 Item uploaded is the wrong type
BANNED 6 Item uploaded has been banned
NOTFOUND 7 Item downloaded was not found
Authentication
Over the years, the AIM backend has supported several different methods for authentication. The
OpenAIM program only supports the clientLogin method since it makes meeting
the terms requirements easier. The clientLogin method allows the client to collect the user name and
password and make a simple web service call to retrieve authentication credentials. These
credentials are then used in future web service calls to sign requests to help against man in the
middle and reply attacks.
When a client collects the loginId and password for the user it should not normalize them in any
manner. It also should not prevent the user from entering certain characters as the AIM name space
is constantly changing. For example, currently the AIM name space is ASCII based, but in the
future that may change. In general, the client should not perform input checking and instead allow
the backend to reject bad values.
Authentication and requesting the BOSS connection normally requires two web service calls.
1. The clientLogin call checks the key, loginId, and password and performs any rate limit or
captcha challenges.
2. The startOSCARSession call requests a BOSS connection and returns where the client needs
to connect to and a one time use cookie to present to the BOSS server for authentication.
This call requires an OAuth style URL signing which is described along with clientLogin.
Here is an example of the signon process:
For example, if the sessionSecret was "AB123FO" and the user's password was "weakpassword",
then the sessionKey would be "ZyCaA1QlF8oBzh0QXeXNCf+7qUItBaiXwk3xOVcFZhY="
Historically some hmac_sha256_base64 do not return valid base64 data. All these APIs require
valid base64 data, so check the implementation being used.
$uri = "[Link]
$queryString =
"a=[TOKEN]&clientName=CLIENTNAME]&clientVersion=[CLIENTVERSION]&f=[FORMAT]&k=[KEY]&ts=[TI
ME]&useTLS=[USETLS]";
$hashData= "GET&" . uri_encode($uri) . "&" . uri_encode($queryString);
$digest = hmac_sha256_base64($hashData, $sessionKey);
$url = $uri . "?" . $queryString . "&sig_sha25sig_sha256=$digest";
$uri = "[Link]
$queryString = "a=[TOKEN]&destURL=[DESTURL]&devId=[KEY]&entryType=client2Web&ts=[TIME]";
$hashData= "GET&" . uri_encode($uri) . "&" . uri_encode($queryString);
$digest = hmac_sha256_base64($hashData, $sessionKey);
$url = $uri . "?" . $queryString . "&sig_sha256=$digest";
Expressions Requirement
Supporting expressions is one of the available choices to meet the requirements of the terms. Both
the ability to choose expressions from a web page and the ability to display at least Buddy icons is
required. So the expression chooser can be fully customized, we require authentication credentials
to be passed using the Single Signon method described above.
Showing the expression chooser is simple.
1. Form the expressions URL following the instructions documented here.
2. Use the Single Signon method described above to form the full signed URL for the browser.
3. Launch the browser with the full URL.
Showing Buddy icons for a user requires a little more work.
Examples
Signon Flow
Here is a complete signon flow using example loginIds and passwords.
2. Assuming correct loginId, password, and no CAPTCHA challenge, a good response will
look like the following:
<response xmlns="[Link]
<statusCode>200</statusCode>
<statusText>OK</statusText>
<data>
<token>
<expiresIn>86400</expiresIn>
<a>
%2FwEAAAAAm3uC7kLggQUTUxDaptz5ddrYlsBinH5jBpi3aKVFOwRZUdy4VC3HBXkdtUaFOTM8E9o
g492eGQi3X0cIrwRfN5SsuA%2BE9nGhXtbQt
%2BHoaa8Fw9yMTuuuks3%2F8ZRh0IyGOaLWhQssgtB3vEoEEQPSc4ZZcUARXm0b3GBfEW5E3QGjTvi
6tRPsVpmnfSQ%3D</a>
</token>
<sessionSecret>m3UPFGcH5hmKSv24</sessionSecret>
</data>
</response>
$queryString = "a=" .
uri_encode("%2FwEAAAAAm3uC7kLggQUTUxDaptz5ddrYlsBinH5jBpi3aKVFOwRZUdy4VC3HBXkdtU
aFOTM8E9og492eGQi3X0cIrwRfN5SsuA%2BE9nGhXtbQt
%2BHoaa8Fw9yMTuuuks3%2F8ZRh0IyGOaLWhQssgtB3vEoEEQPSc4ZZcUARXm0b3GBfEW5E3QGjTvi
6tRPsVpmnfSQ%3D") .
"&clientName=" . uri_encode("Cool Client") .
"&clientVersion=3&f=xml&k=thekey&ts=1203799990";
= "a=
%252FwEAAAAAm3uC7kLggQUTUxDaptz5ddrYlsBinH5jBpi3aKVFOwRZUdy4VC3HBXkdtUaFOTM8E
9og492eGQi3X0cIrwRfN5SsuA%252BE9nGhXtbQt
%252BHoaa8Fw9yMTuuuks3%252F8ZRh0IyGOaLWhQssgtB3vEoEEQPSc4ZZcUARXm0b3GBfEW5E3Q
GjTvi6tRPsVpmnfSQ%253D&clientName=Cool
%20Client&clientVersion=3&f=xml&k=thekey&ts=1203799990";
<data>
<host>[Link]</host>
<port>9343</port>
<cookie>yoOR9mTV9hGH2vHNXtDytoHTu4q/yYpzkQzrs9L0GKg9ePe29nfS6J0+mIJD0ibMndzjde1Asumq
Q6q+1pW95IyNHIhLxDm0PKF+aV8Mg05WZ7guQwiaNGPGXOq5qHI4kIyuVFU1kb9suwStkn+awsySalirJ
vTJbnbws2RqEV7MsBNF99MUJl+PEHuvEtqAAPuq0HvUGiFqPLC25D+cTYFmLMRwoQPtqIaHHAlaxo+
kSWDTAKLzXGZ1JS/6Jd1p2HqPaBjCXuawVFpbwJT+DepJojJHGA4YMGh+YxM8dIfG8IH28w3/
cqMZB/RDKaqZX+p0/AH4eqg34+BtYrfq/g==</cookie>
</data>
</response>
Step #6 - Online
The client is now considered online, visible to other users, and will start to
receive BUDDY__ARRIVED for any online buddies.
Sending an IM
An IM conversation involves multiple CLIENT_EVENTS and ICBMs. CLIENT_EVENTS are
used to inform the remote user what the sender is doing so the remote user knows they are still
there. Here is a sample session where GabbyGrace is sending IMs to ChattingChuck.
Step #2 - Sending IM
Field Size Value
u08 [Link] '*'
u08 [Link] 2 (FLAP__FRAME_TYPE_DATA)
u16 [Link] XX
u16 [Link] YY
u16 [Link] 4 (ICBM)
u16 [Link] 6 (ICBM__CHANNEL_MSG_TOHOST)
u16 [Link] 0
u32 [Link] ZZ
Array of
cookie '12345678'
u08
u16 channel 1 (ICBM__CHANNELS_IM)
u08 [Link] 13
Array of
[Link] 'ChattingChuck'
u08
u16 icbmTlvs[0].tag 3 (ICBM__TAGS_REQUEST_HOST_ACK)
u16 icbmTlvs[0].len 0
u16 icbmTlvs[1].tag 2 (ICBM__TAGS_IM_DATA)
u16 icbmTlvs[1].len 15
0x0501
u16 icbmTlvs[1].imData[0].tag
(ICBM__IM_DATA_TAGS_IM_CAPABILITIES)
u16 icbmTlvs[1].imData[0].len 1
u08 icbmTlvs[1].imData[0].value 1
u16 icbmTlvs[1].imData[1].tag 0x0101 (ICBM__IM_DATA_TAGS_IM_TEXT)
u16 icbmTlvs[1].imData[1].len 6
icbmTlvs[1].imData[1].encodin
u16 0 (ICBM__IM_SECTION_ENCODINGS_ASCII)
g
icbmTlvs[1].imData[1].languag
u16 0
e
u08 icbmTlvs[1].imData[1].data 'Hi'
Step #4 - Receiving IM
Field Size Value
u08 [Link] '*'
u08 [Link] 2 (FLAP__FRAME_TYPE_DATA)
u16 [Link] XX
u16 [Link] YY
u16 [Link] 4 (ICBM)
u16 [Link] 7 (ICBM__CHANNEL_MSG_TOCLIENT)
u16 [Link] 0
u32 [Link] ZZ
Array of
cookie '12345678'
u08
u16 channel 1 (ICBM__CHANNELS_IM)
u08 [Link] 10
Array of
[Link] 'GabbyGrace'
u08
u16 [Link] 0
u16 [Link] 1
1
u16 [Link][0].tag
(OSERVICE__NICK_INFO_TAGS_NICK_FLAGS)
u16 [Link][0].len 2
u16 [Link][0].value 0x10
u16 icbmTlvs[0].tag 2 (ICBM__TAGS_IM_DATA)
u16 icbmTlvs[0].len 15
0x0501
u16 icbmTlvs[0].imData[0].tag
(ICBM__IM_DATA_TAGS_IM_CAPABILITIES)
u16 icbmTlvs[0].imData[0].len 1
u08 icbmTlvs[0].imData[0].value 1
u16 icbmTlvs[0].imData[1].tag 0x0101 (ICBM__IM_DATA_TAGS_IM_TEXT)
u16 icbmTlvs[0].imData[1].len 6
icbmTlvs[0].imData[1].encodin
u16 0 (ICBM__IM_SECTION_ENCODINGS_ASCII)
g
icbmTlvs[0].imData[1].languag
u16 0
e
u08 icbmTlvs[0].imData[1].data 'Hi'
$destUrl = uri_encode("[Link]
$uri = "[Link]
$queryString = "a=" .
uri_encode("%2FwEAAAAAm3uC7kLggQUTUxDaptz5ddrYlsBinH5jBpi3aKVFOwRZUdy4VC3HBXkdtUaFOTM8
E9og492eGQi3X0cIrwRfN5SsuA%2BE9nGhXtbQt
%2BHoaa8Fw9yMTuuuks3%2F8ZRh0IyGOaLWhQssgtB3vEoEEQPSc4ZZcUARXm0b3GBfEW5E3QGjTvi6tRPsVp
mnfSQ%3D") .
"&destUrl=$destUrl" .
"&devId=thekey" .
"&entryType=client2Web" .
"&ts=203799990";
= "a=
%252FwEAAAAAm3uC7kLggQUTUxDaptz5ddrYlsBinH5jBpi3aKVFOwRZUdy4VC3HBXkdtUaFOTM8E9og492e
GQi3X0cIrwRfN5SsuA%252BE9nGhXtbQt
%252BHoaa8Fw9yMTuuuks3%252F8ZRh0IyGOaLWhQssgtB3vEoEEQPSc4ZZcUARXm0b3GBfEW5E3QGjTvi6tR
PsVpmnfSQ%253D&destUrl=http%3A%2F%[Link]%2Faim%2FgetStartPage%3Ff%3Dhtml
%26language%3Den-us&devId=thekey&entryType=client2Web&ts=203799990"