OpenDota offers users the possibility to register webhooks, allowing you to get notified whenever a game gets detected and parsed. Each subscription has to specify one or multiple criteria the webhook is subscribing to. The available criteria are:
- Player ID (Dota2 account ID)
- League ID
- Team ID
You can subscribe to any combination of the above criteria and of course,
multiple of the same ones. Each time a match is scanned or parsed that
contains a player, league, team whose ID you've subscribed to, the result
will get posted to your webhook. It has the same format a call to the
/matches
endpoint would get you, with an additional origin
field
indicating whether the match was scanned or parsed.
In order to call any of the following endpoints, you must be authenticated.
This means that you must have a valid Steam OpenID 2.0 session on the
opendota.com
domain
Lists the IDs of all your registered webhooks
[
'78f70061-6ea7-488c-9829-ae3baa388e89',
'130e8711-1224-44df-b193-4c2b06e9bbf0'
]
Allows you to register a new webhook. You cannot register the same URL twice. If you want to change a registered webhook, either update it or delete it.
{
"url": "https://gg.end",
"subscriptions": {
"players": ["19672354"],
"teams": ["2586976", "2163", "39"]
}
}
Returns the details of the webhook corresponding to the given ID
{
"url": "https://gg.end",
"subscriptions": {
"players": ["19672354"],
"teams": ["2586976", "2163", "39"]
}
}
Updates the subscriptions of the webhook corresponding to the given ID
{
"subscriptions": {
"players": ["19672354"],
"teams": ["2586976", "2163"]
}
}
Delete the webhook corresponding to the given ID