Skip to content

Commit

Permalink
fix: fix EN
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtheted authored Nov 2, 2024
1 parent a9a2441 commit dfffe0e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions marzban/en/docs/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/xxxxxxx"

- Here’s an example using `Python` and `Flask` to set up a server that verifies Marzban webhook notifications.

```
::: details code example
::: code-group
```code
from flask import Flask, request, jsonify
import hmac
import hashlib
Expand Down Expand Up @@ -104,10 +106,13 @@ def webhook():
if __name__ == '__main__':
app.run(port=5000)
```
:::

## Example request sent from Marzban:

```
::: details request example
::: code-group
```code
Headers:
Host: 0.0.0.0:9000
User-Agent: python-requests/2.28.1
Expand All @@ -123,3 +128,4 @@ Content-Type: application/json
Body:
{"username": "marzban_test_user", "action": "user_updated", "enqueued_at": 1680506457.636369, "tries": 0}
```
:::

0 comments on commit dfffe0e

Please sign in to comment.