Returns information about a Battle.net friend account.
accountInfo = C_BattleNet.GetAccountInfoByID(id [, wowAccountGUID])
= C_BattleNet.GetFriendAccountInfo(friendIndex [, wowAccountGUID])
number - This is the same ID as the
bnetAccountID return field.
: string? BNetAccountGUID
string : UnitGUID
number - Index ranging from 1 to BNGetNumFriends() wowAccountGUID
: string? BNetAccountGUID
number Unique numeric identifier for the friend's Battle.net account during this session
string A protected string representing the friend's full name or BattleTag name
string The friend's BattleTag (e.g., "Nickname#0001")
boolean Whether or not the friend is known by their BattleTag
number The number of seconds elapsed since this friend was last online (from the epoch date of January 1, 1970). Returns nil if currently online.
boolean Whether or not the friend is flagged as Away
boolean Whether or not the friend is flagged as Busy
boolean Whether or not the friend is marked as a favorite by you
string The Battle.net broadcast message
number The number of seconds elapsed since the current broadcast message was sent
string The contents of the player's note about this friend
number? Unique numeric identifier for the friend's Battle.net game account
string? The name of the logged in toon/character
string? The name of the logged in realm
number? The ID for the logged in realm
string? The englishFaction name (i.e., "Alliance" or "Horde")
string? The localized race name (e.g., "Blood Elf")
string? The localized class name (e.g., "Death Knight")
string? The localized zone name (e.g., "The Undercity")
number? The current level (e.g., "90")
string? For WoW, returns "zoneName - realmName". For StarCraft 2 and Diablo 3, returns the location or activity the player is currently engaged in.
string? A unique numeric identifier for the friend's character during this session.
boolean Whether or not this toon is the one currently being displayed in Blizzard's FriendFrame
Shows your own account info.
Shows your Battle.net friends' account information.
for i = 1 , BNGetNumFriends () do
local acc = C_BattleNet . GetFriendAccountInfo ( i )
local game = acc . gameAccountInfo
print ( acc . bnetAccountID , acc . accountName , game . gameAccountID , game . isOnline , game . clientProgram )
-- 1, "|Kq2|k", 5, true, "BSAp"
-- 2, "|Kq1|k", nil, false, ""
/ Patch 8.2.5 API (2019-09-24): Reworked and moved to
C_BattleNet.GetAccountInfoByID(). The previous alias is deprecated.
/ Patch 6.2.4 API (2016-03-22): Replaced
/ Patch 5.0.4 API (2012-08-28): Replaced
/ Patch 3.3.5 API (2010-06-22): Added as BNGetFriendInfo() and BNGetFriendInfoByID().