Skip to main content

overwolf.profile API

Use this API to get Overwolf information for the current user of the app (e.g user name, user log-in event, etc.)

Permissions required: profile

Methods Reference

Events Reference

Types Reference

getCurrentUser(callback)

Version added: 0.78

Calls the given callback with the currently logged-in Overwolf user.

ParameterTypeDescription
callback(Result: GetCurrentUserResult) => voidA function called with the current user, or an error.

refreshUserProfile(callback)

Version added: 0.128

Fetches user profile from server, then invokes the callback with the currently logged-in Overwolf user.

ParameterTypeDescription
callback(Result: GetCurrentUserResult) => voidA function called with the current user, or an error.

openLoginDialog()

Version added: 0.80

Opens the login dialog.

onLoginStateChanged

Version added: 0.78

Fired when a user logged in or logged out, with the following structure: LoginStateChangedEvent Object

GetCurrentUserResult Object

ParameterTypeDescription
successbooleaninherited from the "Result" Object
errorstringinherited from the "Result" Object
statusstringdeprecated. For backward compatibility only
Reasonstringdeprecated. For backward compatibility only
usernamestringunique identifier. null for not logged-in users
userIdstringsee note
machineIdstring
partnerIdint
channelstring
parametersstring
installParamsJSONsee Creating Download Link
avatarstring
installerExtensionstring
displayNamestring

Note: userId is not a unique identifier

The term userId might be a bit misleading: it's not a unique identifier for an Overwolf user. The userId is unique for each OW client installation on the current machine, so it's more like "clientID".
We use it to identify not logged-in users on the machine.

On a Windows computer, with multiple users - there might be multiple userIds but a single MachineId;

To uniquely identify logged-in users, you should use the username (this field will be null for not logged-in user).

Each user has to pick a unique OW username upon registering. Even If he logged in through Google, Discord, etc. - OW automatically generate a unique user name for him.
So at the bottom line, you can always count on the username to be a unique identifier for logged-in users.

Example data: Success

{
"success": true,
"error": "",
"username":"itaygl",
"userId":"OW_34153336-192b-44f6-aa0f-4a9b744c689d",
"machineId":"653000ad-001c-43e9-a5c9-e23db5ad370a",
"partnerId":0,
"channel":"website",
"displayName": "itay gl",
"avatar": "https://lh5.googleusercontent.com/-vvsdlz7W2oM/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3reB9VADjY3FzaTDSA7-Adrsny38xg/mo/photo.jpg?sz=50",
"installParams": "{source: "", medium: "", campaign: "", term: "", content: """,
}

Example data: Failure

If the user is not logged-in, the success will be false, but you’ll still get the rest of the available data (userId, machineId, etc.)

{  
"success": false,
"error": "Not signed in",
"status":"error",
"reason":"Not signed in",
"username":null,
"userId":"OW_34153336-192b-44f6-aa0f-4a9b744c689d",
"machineId":"653000ad-001c-43e9-a5c9-e23db5ad370a",
"partnerId":0,
"channel":"website",
"parameters":{"no-ftue":null},
"installParams":null,
"avatar":""
}

LoginStateChangedEvent Object

ParameterTypeDescription
statusstring
connectionStateConnectionState enum
usernamestring

Event data example: Success

{
"status": "success",
"connectionState": "Online", // can be "Online", "Offline", "Connecting", etc.
"username": "..." // when the status is other than "Offline", will be the currently connected username.
}

ConnectionState enum

OptionDescription
Unknown
Offline
Connecting
Online
Disconnecting