The login instructions for API access (https://openrisknet.org/e-infrastructure/login-instructions) need an update for 2FA authentication. This requires parameter -d totp=OneTimeToken:
token=$(curl -d "grant_type=password" -d "client_id=client" -d "username=username" -d "password=password" -d "totp=OneTimeToken" sso.prod.openrisknet.org/auth/realms/openrisknet/protocol/openid-connect/token 2> /dev/null | jq -r '.access_token')