Category:API functions/restricted

From Warcraft Wiki
Jump to navigation Jump to search
👉See also: Object security

Addons and macro scripts are insecure code and are bound by different measures of restrictions when calling API functions. If taint spreads to the rest of the UI this will render Blizzard code insecure too.


APIs which cannot be called by insecure code. Fires ADDON_ACTION_FORBIDDEN.

/run JumpOrAscendStart()

API restricted 01.png

*** ForceTaint_Strong *** means it was called from a /run script, otherwise this would normally be the addon name.


APIs which require a hardware event (like the user clicking a button). Fires ADDON_ACTION_BLOCKED.

/run C_Timer.After(0, function() SetCurrentTitle(47) end) -- does not work


APIs which cannot be called in combat. Fires ADDON_ACTION_BLOCKED.

/run CreateMacro("test", 136243) -- does not work in combat


Widget APIs which cannot be called on secure frames in combat. Fires ADDON_ACTION_BLOCKED.

/run ActionButton1:Hide() -- does not work in combat

API restricted 02.png


Widget APIs which cannot be called on restricted frames such as nameplates. Throws a Lua error.

/dump NamePlate1:GetBottom() -- Error: [string "return NamePlate1:GetBottom()"]:1: Action[FrameMeasurement] failed because[Can't measure restricted regions]: attempted from: NamePlate1:GetBottom().


APIs which cannot be called directly from a /run script or WeakAura. Fires ADDON_ACTION_BLOCKED or silently fails, depending on the API.

/run C_AuctionHouse.SearchForFavorites({}) -- does not work and also bricks the AH in the process

Putting it inside a function in an addon and then calling it manually works.

function Example() -- /run Example()
-- or as a button
local btn = CreateFrame("Button", nil, UIParent, "UIPanelButtonTemplate")
btn:SetSize(120, 40)
btn:SetScript("OnClick", function(self, button)

Pages in category "API functions/restricted"

The following 200 pages are in this category, out of 213 total.

(previous page) (next page)


(previous page) (next page)