overwolf.profile

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

Methods

getCurrentUser(callback)

Version added: 0.78

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

  • Parameter: callback <function>

    A function called with the current user, or an error.

Callback argument:
{
    "status": "success",
    "username": "username",
    "userId": "OW_44f4533c-7704-39b1-6560-36bd14d26d99",
    "machineId": "00ea040e-af74-5046-6c8f-57a27dc20fb7",
    "partnerId": 3713,
    "channel": "Regular"
}

openLoginDialog()

Version added: 0.80.0

Opens the login dialog.

Events How to use events

onLoginStateChanged

Version added: 0.78

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

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