Quick Start
Developer Application → API Key → SDK接続までの最短手順です。
pip install dwsdk1. Developer Applicationを作成
Developer DashboardへDiscordでログインし、Applicationを作成します。
2. API Keyを発行
必要なScopeのみ選択してください。Secretは発行時に安全な場所へ保存し、ソースコードへ直接書かないでください。
DWALLET_API_KEY=dwk_live_REPLACE_ME
DWALLET_BASE_URL=https://api.dwallet.online
DWALLET_TIMEOUT_SECONDS=15import asyncio
from dwallet import DWalletClient
async def main():
async with DWalletClient.from_env() as client:
user = client.for_user("123456789012345678")
balance = await user.balance()
print(balance["total"])
asyncio.run(main())Developer Dashboard
Application、API Key、Scope、Webhook、Usage、Audit、Payment履歴はDeveloper Dashboardから管理できます。
