Skip to main content

overwolf.utils API

Use this API to get the user’s system information, send keystrokes to the game, open URL in default browser and more.

Common use cases:

  • Getting a string that is currently placed on the clipboard.
  • Getting the user’s system information (OS, monitors, CPU, GPU, input devices and more).
  • Opening a URL in a browser.
  • Send keystrokes to the running game.

Methods Reference

Types Reference

placeOnClipboard(data)

Version added: 0.80

Permissions required: Clipboard

Copies the given string to the clipboard.

ParameterTypeDescription
datastringThe string to be copied to the clipboard

getFromClipboard(callback)

Version added: 0.83

Permissions required: Clipboard

Gets the string currently placed on the clipboard. If no string is placed on the clipboard, returns null.

ParameterTypeDescription
callbackfunctionCalled with the string from the clipboard

getMonitorsList(callback)

Version added: 0.83

Permissions required: DesktopStreaming

Returns an array with all monitors data including their display resolution, bounds, and names.

ParameterTypeDescription
callback(Result: GetMonitorsListResult) => voidCalled with the monitors array

getWindowDPI(callback)

Version added: 0.83

Permissions required: DesktopStreaming

Returns the DPI and sclae of the current window.

OBSOLETE

We removed this function from our API. Instead, please use Window.devicePixelRatio to get the DPI of the current window. It's pure JS and even more efficient. More info about DPI and OW windows.

ParameterTypeDescription
callbackfunctionCalled with the DPI info

getClientInfo(callback)

Version added: 0.198

Returns the (UNIX) time, of when Overwolf was installed, as well as the amount of seconds the client has been running for.

ParameterTypeDescription
callback(Result) => voidCalled with the detailed info

An example return value

result: 
{
"installTime": 1651496699,
"uptimeSeconds": 100
}

Callback argument: Success

A callback function which will be called with the status of the request

{
"status": "success",
"dpi": 120,
"scale": 1.25
}

sendKeyStroke(keyString)

Version added: 0.83

Permissions required: GameControl

Sends a string representing a key stroke to the game, causing a simulated key stroke.

ParameterTypeDescription
keyStringstringThe key or key combination to send, as a string. e.g. “Alt+I”

The accepted input for the keyString param is identical to Microsoft's Key enum.

openFilePicker(filter, callback)

Version added: 0.91

Permissions required: FileSystem

Opens a file picker dialog to browse for a file. A url to the selected file will be returned.

ParameterTypeDescription
filterstringA file filter. See notes
callback(Result: OpenFilePickerResult) => voidCalled with a url to the selected file

filter notes

Provide an empty string for wild cards or separate value by commas (,). Ex. myFile.,*.txt.

openFilePicker(filter, initialPath, callback)

Version added: 0.141

Permissions required: FileSystem

Opens a file picker dialog to browse for a file. A url to the selected file will be returned. In addition, this function also allows you to set the initial path/folder to start browsing from.

ParameterTypeDescription
filterstringA file filter. A file filter. See notes
initialPath (optional)stringAn optional path to start browsing from
callback(Result: OpenFilePickerResult) => voidCalled with a url to the selected file
multipleSelect (optional)booleanAn optional param to allow multiple file selection

openFolderPicker(initialPath, callback)

Version added: 0.91

Opens a Folder picker dialog to browse for a folder. A full path to the selected folder will be returned.

ParameterTypeDescription
initialPathstringThe starting folder's path
callback(Result: OpenFolderPickerResult) => voidCalled with the selected folder

openWindowsExplorer(url, callback)

Version added: 0.91

Opens Windows Explorer and selects a file received as an Overwolf media url.

ParameterTypeDescription
urlstringAn overwolf media url (overwolf://media/*)
callback(Result) => voidA callback function which will be called with the status of the request

isTouchDevice(callback)

Version added: 0.91

Returns whether the current device has touch capabilities.

ParameterTypeDescription
callback(Result: IsTouchDeviceResult) => voidCalled with the result of the request

openUrlInDefaultBrowser(url)

Version added: 0.91

Opens the url in the user’s default browser.

ParameterTypeDescription
urlstringA url to open

openUrlInOverwolfBrowser(url)

Version added: 0.91

Opens the url in Overwolf's browser.

ParameterTypeDescription
urlstringA url to open
targetTabName [optional]stringA target tab - so that multiple calls will end up in the same tab

openUrlInDefaultBrowser(url,openUrlOptions)

Version added: 0.153

Opens the url in the user’s default browser.

ParameterTypeDescription
urlstringA url to open
openUrlOptionsOpenUrlOptions Objectallows extra behaviour

Usage example

Do not display the pop-up warning for the user if in-game:

overwolf.utils.openUrlInDefaultBrowser("http://overwolf.com", {
skip_in_game_notification:true
})

getSystemInformation(callback)

Version added: 0.92

Returns system information which includes information about CPU, Monitors, GPU, HDD, RAM and more.

ParameterTypeDescription
callback(Result: GetSystemInformationResult) => voidCalled with the system information

getPeripherals(callback)

Version added: 0.98

Returns system peripherals information.

ParameterTypeDescription
callback(Result: GetPeripheralsResult) => voidCalled with the peripherals information

openStoreOneAppPage(appId)

Version added: 0.137

Opens the requested app’s profile page in the Overwolf Appstore.

ParameterTypeDescription
appIdstringThe requested app id

openStore(param)

Version added: 0.137

Opens the requested app’s profile/login/subscription page in the Overwolf Appstore.

ParameterTypeDescription
paramOpenStoreParams ObjectThe requested store page

Usage example

open current app subscription page:

overwolf.utils.openStore({
page:overwolf.utils.enums.eStorePage.SubscriptionPage
})

or specify app uid

overwolf.utils.openStore({
page:overwolf.utils.enums.eStorePage.SubscriptionPage,
uid:"fiekjlgoffmlmgfmggnoeoljkmfkcapcdmcgcfgm"
})

isMouseLeftButtonPressed(callback)

Version added: 0.104

Returns whether the mouse’s left button was pressed

ParameterTypeDescription
callback(Result: IsMouseLeftButtonPressedResult) => voidA callback with the result

uploadClientLogs(callback)

Version added: 0.111

Upload Overwolf client logs to Overwolf servers for the current calling app

ParameterTypeDescription
callbackUploadClientLogsResultA callback function which will be called with the status of the request

uploadClientLogs(UploadClientLogsOptions, callback)

Version added: 0.194

Upload Overwolf client logs to Overwolf servers for the current calling app

ParameterTypeDescription
UploadClientLogsOptionsUploadClientLogsOptions ObjectOptions object you can pass when calling the function
callbackUploadClientLogsResultA callback function which will be called with the status of the request

checkForClientUpdates(callback)

Version added: 0.191

Checks whether an Overwolf client update is available.

ParameterTypeDescription
callback(ClientUpdateStatusResult Object) => voidA callback function which will be called with the status of the request
important

If you choose to inform the user that an update is available. you can use the following snippet to open the Overwolf Settings and initiliaze an update:

overwolf
.extensions
.launch("bebanicmemnmpcomjjlnjkeionhgkkdgfdocgdam",
"location=about#check_for_updates");

Please note that if Overwolf updates while it is in-game, it will not show in-game until the game has been restarted.

eStorePage enum

Version added: 0.137

Available types of an app's store pages.

OptionsDescription
LoginPage
OneAppPageapp's profile page that popup when you click on an app tile in the store
SubscriptionPage
ReviewsPage

OpenStoreParams Object

Version added: 0.137

Container that represent a store page.

ParameterTypeDescription
uidstringthe target app id
pageeStorePage enumStore page to open

GetSystemInformationResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringinherited from the "Result" Object
statusstringdeprecated. For backward compatibility only
Reasonstringdeprecated. For backward compatibility only
systemInfoSystemInfo Object

Example data: Success

{  
"success":true,
"systemInfo":{
"OS":"10.0 64Bit",
"NetFramework":"4.6.1 or later (394802), v2.0.50727 SP2, v3.0 SP2, v3.5 SP1, v4 Client, v4 Full",
"Monitors":[
{
"IsMain":true,
"Name":"DELL U2412M",
"Resolution":"1920, 1200",
"Location":"0, 0",
"Dpix":96,
"Dpiy":96
},
{
"IsMain":false,
"Name":"DELL U2412M",
"Resolution":"1920, 1200",
"Location":"1920, 0",
"Dpix":96,
"Dpiy":96
}
],
"CPU":"Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz",
"LogicalCPUCount":4,
"PhysicalCPUCount":4,
"VidEncSupport ":true,
"GPUs":[
{
"Name":"AMD Radeon HD 7900 Series",
"Manufacturer":"Advanced Micro Devices, Inc.",
"ChipType":"AMD Radeon Graphics Processor (0x679A)"
}
],
"MemorySize":"8531234816",
"NumberOfScreens":2,
"HardDisks":[
{
"Caption":"Samsung SSD 840 EVO 120GB",
"Size":120031511040,
"IsSsd":true
},
{
"Caption":"ST1000DM003-1ER162",
"Size":1000202273280,
"IsSsd":false
}
],
"Manufacturer":"MSI",
"Model":"MS-7817",
"IsLaptop":false,
"Motherboard":"MSI H81M-P33 (MS-7817)",
"AudioDevices":[
"AMD High Definition Audio Device",
"Realtek High Definition Audio",
"Logitech G933 Gaming Headset"
],
"InputDevices":[
{
"vendor":1133,
"id":49970,
"type":"MOUSE"
},
{
"vendor":1133,
"id":49714,
"type":"KEYBOARD"
},
{
"vendor":1133,
"id":49963,
"type":"KEYBOARD"
},
{
"vendor":1133,
"id":49713,
"type":"MOUSE"
}
]
}
}

SystemInfo Object

ParameterTypeDescription
AudioDevicesstring[]
CPUstring
GPUsGPUInfo[]
HardDisksHardDiskInfo[]
InputDevicesInputDeviceInfo[]
IsLaptopboolean
LogicalCPUCountnumber
Manufacturerstring
MemorySizestring
Modelstring
MonitorsMonitorInfo[]
Motherboardstring
NetFrameworkstring
NumberOfScreensnumber
OSstring
OSBuildstring
OSReleaseIdstring
PhysicalCPUCountnumber
VidEncSupportboolean
HAGSEnabledbooleanindicates if the current OS enabled the Windows 10 Hardware-Accelerated GPU Scheduling feature

GetMonitorsListResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringinherited from the "Result" Object
statusstringdeprecated. For backward compatibility only
Reasonstringdeprecated. For backward compatibility only
displayDisplay[]the monitors array

Example data: Success

{
"displays": [
{
"name": "Display 2",
"id": "\\.\DISPLAY2",
"x": -1280,
"y": 0,
"dpiX": 96,
"dpiY": 96,
"width": 1280,
"height": 1024,
"is_primary": false,
"handle": {
"value": 65579
}
},
{
"name": "Display 1",
"id": "\\.\DISPLAY1",
"x": 0,
"y": 0,
"dpiX": 96,
"dpiY": 96,
"width": 1920,
"height": 1080,
"is_primary": true,
"handle": {
"value": 65547
}
}
]
}

GPUInfo Object

ParameterTypeDescription
ChipTypestring
Manufacturerstring
Namestring

HardDiskInfo Object

ParameterTypeDescription
Captionstring
IsSsdboolean
Sizenumber

InputDeviceInfo Object

ParameterTypeDescription
idnumber
typestring
vendornumber

MonitorInfo Object

ParameterTypeDescription
Dpixnumber
Dpiynumber
IsMainboolean
Locationstring
Namestring
Resolutionstring

Display Object

ParameterTypeDescription
namestring
idstring
xnumberSee note
ynumberSee note
dpiXnumber
dpiYnumber
widthnumber
heightnumber
is_primaryboolean
handleobjectReturns the current monitor handle

X note

X returns the pixel distance of your currently active monitor from your primary monitor.
For example, if your primary monitor is 1920px wide, and the currently active window is on another monitor located to the left of your primary, X will return 1920 or -1920 based on their relative positions.

Y note

Y returns the pixel distnace of your currently active monitor from your primary monitor.
For Example, if your primary monitor and secondary monitor are side by side, Y will return 0, if your displays are one on top of the other and the primary monitor is 1200px tall, Y will return 1200 or -1200 based on their relative positions.

Example data: Success

{
"success":true,
"displays":[
{
"name":"Generic PnP Monitor",
"id":"\\\\.\\DISPLAY1",
"x":-1920,
"y":-25,
"width":1920,
"height":1080,
"is_primary":false,
"handle":{
"value":14159063
},
"dpiX":120,
"dpiY":120
},
{
"name":"Generic PnP Monitor",
"id":"\\\\.\\DISPLAY4",
"x":0,
"y":0,
"width":1680,
"height":1050,
"is_primary":true,
"handle":{
"value":1182814
},
"dpiX":96,
"dpiY":96
}
]
}

OpenFilePickerResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringinherited from the "Result" Object
urlstringa url to the selected file
filestringan absolute path to the selected file

Example data: Success

{
"success": true,
"url": "overwolf-fs://C/file.txt",
"file": "C:\file.txt"
}

Or in case of multiples files picks

{
"success": true,
"urls": [
"overwolf-fs://C/file1.txt",
"overwolf-fs://C/file2.txt"
]

}

You can use the retrieved URL later to serve the stated file: for example, to upload it to a remote server, you can use XMLHttpRequest. Using a file URL (file://) and not OW URL (overwolf-fs://), will trigger a cross-origin error.

OpenUrlOptions Object

Version added: 0.153

Container for extra browser behaviour.

Right now "skip_in_game_notification" is the only option.

ParameterTypeDescription
skip_in_game_notificationbooleanWhen set to true, Do not display the pop-up warning for the user if in-game

UploadClientLogsOptions Object

Version added: 0.194

Additional options when using the UploadClientLogs API

ParameterTypeDescription
filePrefixstringThis property allows you to choose the prefix of the uploaded log file.

OpenFolderPickerResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringinherited from the "Result" Object
pathstringThe selected folder

Example data: Success

{
"status": "success",
"path": "E:/Downloads"
}

peripherals Object

ParameterTypeDescription
inputDevicesInputDeviceInfo[]
audioDevicesstring[]

GetPeripheralsResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringinherited from the "Result" Object
peripheralsperipherals object

Example data: Success

{  
"success":true,
"peripherals":{
"inputDevices":[
{
"vendor":1133,
"id":49970,
"type":"MOUSE"
},
{
"vendor":1133,
"id":49714,
"type":"KEYBOARD"
},
{
"vendor":1133,
"id":49963,
"type":"KEYBOARD"
},
{
"vendor":1133,
"id":49713,
"type":"MOUSE"
}
],
"audioDevices":[
"AMD High Definition Audio Device",
"Realtek High Definition Audio",
"Logitech G933 Gaming Headset"
]
}
}

IsMouseLeftButtonPressedResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringinherited from the "Result" Object
pressedboolean

ClientUpdateResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringOnly returns in cases where "success" is false
channelstringThe channel the user is currently on
currentVersionstringThe Overwolf version currently installed
hasUpdatebooleanTrue if there's an update available
newVersionstringThe new available version, null if no update is available.
updatesDisabledboolIn cases where the user has disabled their Overwolf updates