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
- overwolf.utils.placeOnClipboard()
- overwolf.utils.getFromClipboard()
- overwolf.utils.getMonitorsList()
- overwolf.utils.getWindowDPI()
- overwolf.utils.getClientInfo()
- overwolf.utils.sendKeyStroke()
- overwolf.utils.openFilePicker()
- overwolf.utils.openFilePicker()
- overwolf.utils.openFolderPicker()
- overwolf.utils.openNativeFolderPicker()
- overwolf.utils.openNativeFilePicker()
- overwolf.utils.openWindowsExplorer()
- overwolf.utils.isTouchDevice()
- overwolf.utils.openUrlInDefaultBrowser()
- overwolf.utils.openUrlInOverwolfBrowser()
- overwolf.utils.openUrlInOverwolfBrowser()
- overwolf.utils.getSystemInformation()
- overwolf.utils.getPeripherals()
- overwolf.utils.openStoreOneAppPage()
- overwolf.utils.openStore()
- overwolf.utils.isMouseLeftButtonPressed()
- overwolf.utils.createLogsZip()
- overwolf.utils.uploadClientLogs()
- overwolf.utils.uploadClientLogs()
- overwolf.utils.checkForClientUpdates()
Types Reference
- overwolf.utils.enums.eStorePage enum
- overwolf.utils.OpenStoreParams Object
- overwolf.utils.GetSystemInformationResult Object
- overwolf.utils.SystemInfo
- overwolf.utils.GetMonitorsListResult Object
- overwolf.utils.workingArea Object
- overwolf.utils.GPUInfo Object
- overwolf.utils.HardDiskInfo Object
- overwolf.utils.InputDeviceInfo Object
- overwolf.utils.MonitorInfo Object
- overwolf.utils.Display Object
- overwolf.utils.OpenFilePickerResult Object
- overwolf.utils.OpenUrlOptions Object
- overwolf.utils.OpenFolderPickerResult Object
- overwolf.utils.IsTouchDeviceResult Object
- overwolf.utils.GetPeripheralsResult Object
- overwolf.utils.IsMouseLeftButtonPressedResult Object
- overwolf.utils.ClientUpdateStatusResult Object
- overwolf.utils.UploadClientLogsOptions Object
- overwolf.utils.UploadClientLogsResult Object
- overwolf.utils.CreateLogsZipResult Object
placeOnClipboard(data)
Version added: 0.80
Permissions required: Clipboard
Copies the given string to the clipboard.
Parameter | Type | Description |
---|---|---|
data | string | The 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.
Parameter | Type | Description |
---|---|---|
callback | function | Called 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.
Parameter | Type | Description |
---|---|---|
callback | (Result: GetMonitorsListResult) => void | Called with the monitors array |
getWindowDPI(callback)
Version added: 0.83
Permissions required: DesktopStreaming
Returns the DPI and sclae of the current window.
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.
Parameter | Type | Description |
---|---|---|
callback | function | Called 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.
Parameter | Type | Description |
---|---|---|
callback | (Result) => void | Called 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.
Parameter | Type | Description |
---|---|---|
keyString | string | The 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.
Parameter | Type | Description |
---|---|---|
filter | string | A file filter. See notes |
callback | (Result: OpenFilePickerResult) => void | Called 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.
Parameter | Type | Description |
---|---|---|
filter | string | A file filter. A file filter. See notes |
initialPath (optional) | string | An optional path to start browsing from |
callback | (Result: OpenFilePickerResult) => void | Called with a url to the selected file |
multipleSelect (optional) | boolean | An 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.
Parameter | Type | Description |
---|---|---|
initialPath | string | The starting folder's path |
callback | (Result: OpenFolderPickerResult) => void | Called with the selected folder |
openNativeFolderPicker()
Version added: 0.251
Will open Windows' native file picker dialog for selecting a file.
Parameter | Type | Description |
---|---|---|
initialPath | string | The starting folder's path |
callback | (Result: OpenFolderPickerResult) => void | Called with the selected folder |
openNativeFilePicker()
Version added: 0.251
Will open Windows' native file picker dialog for selecting a file.
Supports the following overrides:
- openNativeFilePicker(filter, callback);
- openNativeFilePicker(filter, initialPath, callback);
- openNativeFilePicker(filter, multipleSelect, callback);
- openNativeFilePicker(filter, initialPath, multipleSelect, callback);
Parameter | Type | Description |
---|---|---|
filter | string | A file filter. A file filter. See notes |
initialPath (optional) | string | An optional path to start browsing from |
callback | (Result: OpenFilePickerResult) => void | Called with a url to the selected file |
multipleSelect (optional) | boolean | An optional param to allow multiple file selection |
openWindowsExplorer(url, callback)
Version added: 0.91
Opens Windows Explorer and selects a file received as an Overwolf media url.
Parameter | Type | Description |
---|---|---|
url | string | An Overwolf media url (overwolf://media/*) |
callback | (Result) => void | A 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.
Parameter | Type | Description |
---|---|---|
callback | (Result: IsTouchDeviceResult) => void | Called with the result of the request |
openUrlInDefaultBrowser(url)
Version added: 0.91
Opens the url in the user’s default browser.
Parameter | Type | Description |
---|---|---|
url | string | A url to open |
openUrlInOverwolfBrowser(url)
Version added: 0.91
Opens the url in Overwolf's browser.
Parameter | Type | Description |
---|---|---|
url | string | A url to open |
targetTabName [optional] | string | A 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.
Parameter | Type | Description |
---|---|---|
url | string | A url to open |
openUrlOptions | OpenUrlOptions Object | allows 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.
Parameter | Type | Description |
---|---|---|
callback | (Result: GetSystemInformationResult) => void | Called with the system information |
getPeripherals(callback)
Version added: 0.98
Returns system peripherals information.
Parameter | Type | Description |
---|---|---|
callback | (Result: GetPeripheralsResult) => void | Called with the peripherals information |
openStoreOneAppPage(appId)
Version added: 0.137
Opens the requested app’s profile page in the Overwolf Appstore.
Parameter | Type | Description |
---|---|---|
appId | string | The requested app id |
openStore(param)
Version added: 0.137
Opens the requested app’s profile/login/subscription page in the Overwolf Appstore.
Parameter | Type | Description |
---|---|---|
param | OpenStoreParams Object | The 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
Parameter | Type | Description |
---|---|---|
callback | (Result: IsMouseLeftButtonPressedResult) => void | A callback with the result |
uploadClientLogs(callback)
Version added: 0.111
Upload Overwolf client logs to the Overwolf servers for the current calling app
Parameter | Type | Description |
---|---|---|
callback | (Result: UploadClientLogsResult) => void | A callback function which will be called with the status of the request |
uploadClientLogs(UploadClientLogsOptions, callback)
Version added: 0.194
Upload Overwolf client logs to the Overwolf servers for the current calling app
Parameter | Type | Description |
---|---|---|
UploadClientLogsOptions | UploadClientLogsOptions Object | Options object you can pass when calling the function |
callback | (Result: UploadClientLogsResult) => void | A callback function which will be called with the status of the request |
This method will fail to execute if UploadClientLogsOptions.filePrefix
contains:
- More than 64 characters
- Illegal characters (meaning anything but
(a-z, A-Z, 0-9, -, _)
)
createLogsZip(callback)
Version added: 0.226
Create an Overwolf client logs zip as a local file
Parameter | Type | Description |
---|---|---|
callback | (Result: CreateLogsZipResult) => void | A 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.
Parameter | Type | Description |
---|---|---|
callback | (ClientUpdateStatusResult Object) => void | A callback function which will be called with the status of the request |
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.
Options | Description |
---|---|
LoginPage | |
OneAppPage | app'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.
Parameter | Type | Description |
---|---|---|
uid | string | the target app id |
page | eStorePage enum | Store page to open |
GetSystemInformationResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
status | string | deprecated. For backward compatibility only |
Reason | string | deprecated. For backward compatibility only |
systemInfo | SystemInfo 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
Parameter | Type | Description |
---|---|---|
AudioDevices | string[] | |
CPU | string | |
GPUs | GPUInfo[] | |
HardDisks | HardDiskInfo[] | |
InputDevices | InputDeviceInfo[] | |
IsLaptop | boolean | |
LogicalCPUCount | number | |
Manufacturer | string | |
MemorySize | string | |
Model | string | |
Monitors | MonitorInfo[] | |
Motherboard | string | |
NetFramework | string | |
NumberOfScreens | number | |
OS | string | |
OSBuild | string | |
OSReleaseId | string | |
PhysicalCPUCount | number | |
VidEncSupport | boolean | |
HAGSEnabled | boolean | indicates if the current OS enabled the Windows 10 Hardware-Accelerated GPU Scheduling feature |
SystemLanguage | string | the system's UI language |
GetMonitorsListResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
status | string | deprecated. For backward compatibility only |
Reason | string | deprecated. For backward compatibility only |
displays | Display[] | the monitors array |
workingArea | workingArea object | The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. |
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
}
}
]
}
workingArea Object
Parameter | Type | Description |
---|---|---|
width | number | Width of the display's working area |
height | number | Height of the display's working area |
top | number | The top position where the working area starts from |
left | number | The left position where the working area starts from |
GPUInfo Object
Parameter | Type | Description |
---|---|---|
ChipType | string | |
Manufacturer | string | |
Name | string |
HardDiskInfo Object
Parameter | Type | Description |
---|---|---|
Caption | string | |
IsSsd | boolean | |
Size | number |
InputDeviceInfo Object
Parameter | Type | Description |
---|---|---|
id | number | |
type | string | |
vendor | number |
MonitorInfo Object
Parameter | Type | Description |
---|---|---|
Dpix | number | |
Dpiy | number | |
IsMain | boolean | |
Location | string | |
Name | string | |
Resolution | string |
Display Object
Parameter | Type | Description |
---|---|---|
name | string | |
id | string | |
x | number | See note |
y | number | See note |
dpiX | number | |
dpiY | number | |
width | number | |
height | number | |
is_primary | boolean | |
handle | object | Returns 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
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
url | string | a url to the selected file |
file | string | an 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.
Parameter | Type | Description |
---|---|---|
skip_in_game_notification | boolean | When 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
Parameter | Type | Description |
---|---|---|
filePrefix | string | This property allows you to choose a file name prefix for the uploaded log file |
UploadClientLogsResult Object
Version added: 0.111
Result returned when uploading client logs.
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
CreateLogsZipResult Object
Version added: 0.226
Result returned when creating a client's logs .zip logs.
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
zipPath | string | The location of the generated logs .zip |
OpenFolderPickerResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
path | string | The selected folder |
Example data: Success
{
"status": "success",
"path": "E:/Downloads"
}
peripherals Object
Parameter | Type | Description |
---|---|---|
inputDevices | InputDeviceInfo[] | |
audioDevices | string[] |
GetPeripheralsResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
peripherals | peripherals 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
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | inherited from the "Result" Object |
pressed | boolean |
ClientUpdateResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | inherited from the "Result" Object |
error | string | Only returns in cases where "success" is false |
channel | string | The channel the user is currently on |
currentVersion | string | The Overwolf version currently installed |
hasUpdate | boolean | True if there's an update available |
newVersion | string | The new available version, null if no update is available. |
updatesDisabled | bool | In cases where the user has disabled their Overwolf updates |