A silly console-application version of Aula.
Tools for interacting with the Aula API (Danish school communication platform) from the terminal.
curl,jq,openssl— for the auth script- uv — for the TUI app
- A browser — to log in via UNI-Login/MitID
Uses the same OAuth2 flow as the mobile app. The access token is passed as a query parameter (?access_token=...) on API calls — the server establishes a PHP session automatically. Refresh tokens allow automatic session renewal without re-logging in.
./aula-auth.sh login-oauth- Opens a browser to UNI-Login
- After authenticating, the browser redirects to
https://app-private.aula.dk?code=...(page won't load — that's expected). Sometimes the URL goes throughhttps://app-redirect.aula.dk/?returnUri=...instead — both formats are handled automatically. - Copy the full URL from the address bar and paste it into the terminal
- The script exchanges the code for access + refresh tokens, then establishes a session
Tokens are saved to ~/.aula_tokens. When the session expires, refresh with:
./aula-auth.sh refreshThe TUI app also auto-refreshes when it detects an expired session.
Manual cookie extraction — useful if token auth isn't working.
./aula-auth.sh login- Opens a browser to UNI-Login
- After landing on
https://www.aula.dk/portal/, extract thePHPSESSIDcookie from browser DevTools - Paste it into the terminal
| File | Contents |
|---|---|
~/.aula_cookies |
PHP session cookies (set automatically by the API) |
~/.aula_tokens |
OAuth2 access + refresh tokens (from login-oauth) |
Direct API access from the command line.
# Log in via OAuth2/PKCE (recommended)
./aula-auth.sh login-oauth
# Refresh an expired session
./aula-auth.sh refresh
# Log in by pasting PHPSESSID cookie (fallback)
./aula-auth.sh login
# Get your profiles
./aula-auth.sh api profiles.getProfilesByLogin
# Get message threads
./aula-auth.sh api messaging.getThreads page=0
# Get messages in a thread
./aula-auth.sh api messaging.getMessagesForThread threadId=126868442
# Any API call with parameters
./aula-auth.sh api <method> key1=val1 key2=val2A terminal UI built with Textual for browsing Aula.
cd aula-tui && uv run aula-tuiIf a refresh token is available (~/.aula_tokens), the TUI automatically refreshes an expired session.
Features:
- Messages — thread list with message detail view
- Posts — school announcements
- Calendar — next 14 days of events
- Notifications — latest notifications
- Child filter — toggle per-child checkboxes to filter messages
Keybindings:
| Key | Action |
|---|---|
q |
Quit |
l |
Login via browser (Playwright) |
r |
Refresh all data |
f |
Toggle child filters on/off |
Enter |
Open selected thread/post |
Tab |
Navigate between tabs |
aula-auth-flow.md— Authentication flow documentation (OIDC, token auth, curl examples)aula-api-openapi.yaml— OpenAPI 3.0 spec for the Aula API