Skip to content

jkiddo/t-aula

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T-aula

A silly console-application version of Aula.

Aula CLI & TUI

Tools for interacting with the Aula API (Danish school communication platform) from the terminal.

Prerequisites

  • curl, jq, openssl — for the auth script
  • uv — for the TUI app
  • A browser — to log in via UNI-Login/MitID

Authentication

OAuth2/PKCE (recommended)

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
  1. Opens a browser to UNI-Login
  2. After authenticating, the browser redirects to https://app-private.aula.dk?code=... (page won't load — that's expected). Sometimes the URL goes through https://app-redirect.aula.dk/?returnUri=... instead — both formats are handled automatically.
  3. Copy the full URL from the address bar and paste it into the terminal
  4. 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 refresh

The TUI app also auto-refreshes when it detects an expired session.

Cookie paste (fallback)

Manual cookie extraction — useful if token auth isn't working.

./aula-auth.sh login
  1. Opens a browser to UNI-Login
  2. After landing on https://www.aula.dk/portal/, extract the PHPSESSID cookie from browser DevTools
  3. Paste it into the terminal

Session files

File Contents
~/.aula_cookies PHP session cookies (set automatically by the API)
~/.aula_tokens OAuth2 access + refresh tokens (from login-oauth)

Shell Script (aula-auth.sh)

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=val2

TUI App (aula-tui/)

A terminal UI built with Textual for browsing Aula.

cd aula-tui && uv run aula-tui

If 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

Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors