# Discord Status Badges

This service turns a Discord user's live presence into SVG badges for READMEs and websites.

## Important limitation

The user must share a Discord server with the service bot. An `offline` result can mean either
that the user is offline or that the bot cannot currently see them; Discord does not expose
enough information to distinguish those cases.

## Best endpoint for assistants

`GET https://discordbadges.soheab.com/lookup/{user_id}`

Supply a 17-20 digit Discord user ID. The JSON response includes a textual summary, normalized
presence data, badge image URLs, ready-to-use Markdown and HTML, and a populated interactive URL.

## SVG badges

`GET https://discordbadges.soheab.com/badge/{kind}/{user_id}`

Badge kinds: `status`, `music`, `code`, `playing`, `crunchyroll`.

Example Markdown:

```md
![Discord status](https://discordbadges.soheab.com/badge/status/USER_ID)
```

## Presence JSON

`GET https://discordbadges.soheab.com/presence/{user_id}`

For the full machine-readable contract, see [https://discordbadges.soheab.com/openapi.json](https://discordbadges.soheab.com/openapi.json).
