grindsa/dkb-robo

New|Alternative DKB Frontend starting May 2023

Closed this issue · 13 comments

Hey Guys,

DKB is launching an (alternative) login page: https://bank.dkb.de/dein-neues-banking/?wt_mc=pk.ba_ga.fsm.lang.g.230417.

Schneller ins neue Banking – die Login-Seite ändert sich
Ab Anfang Mai gibt es frischen Wind auf deiner Anmeldeseite. Du kannst dich wie gewohnt im bisherigen Banking anmelden oder mit deinen Anmeldedaten das neue Banking ausprobieren.

The transaction list seems to be limited to 1 Year:

Du hast das Ende deiner Umsatzliste erreicht. Wir können Umsätze bis zu 360 Tage anzeigen.

They also seem to change the csv format a bit:

"Konto";"<NAME> <IBAN>"
""
"Kontostand vom <DATE>:";"<AMOUNT> EUR"
""
"Buchungsdatum";"Wertstellung";"Status";"Zahlungspflichtige*r";"Zahlungsempfänger*in";"Verwendungszweck";"Umsatztyp";"Betrag";"Gläubiger-ID";"Mandatsreferenz";"Kundenreferenz"

I did already saw this yesterday but could not log in as I did not get the 2FA confirmation in my banking app. Based on what you wrote I assume you were able to login. Thus, which dkb-app are you using?

I am using the older app as it has more features than the one you are using. Anyway let me upgrade over the weekend and look what I can do.

If you can, please keep the old methods working for a few more versions.. I am actively trying to avoid their new updates until all bugs are fixed.

Hi, I will do all my changes in a separate branch. The current module should work as long as DKB keeps the old banking portal alive... But lets see. Next week we will know more...

Had a look this morning. First thoughts: it does not look that bad. Authentication is based on bearer token so different than before. The new UI is limited in functionality and you can switch to the "legacy" webpage without reauthentication. So there is a good chance that the current methods can be kept and adapted over time and its just the login method which needs to be changed.

Just to keep you guys updated; I extended the library to support logins via the new frontend. After logging a switch to the "old" website will be performed and the data get scraped there. That means that all methods will continue to work for the time being. Support is still experimental, thus please do not use the code in production.

Modifications got pushed to devel and ready for wider testing. Feedback is always welcome. For the moment i have no plans to incorporate to master as there are still api-changes happening from time to time.

You can test the new frontend by using the legacy_login=False option:

with DKBRobo(DKB_USER, DKB_PASSWORD, TAN, legacy_login=False) as dkb:
  ...

I can confirm, it works really well

python3 -m pip install git+https://github.com/grindsa/dkb-robo.git@devel Branch 'devel' set up to track remote branch 'devel' from 'origin'. Resolved https://github.com/grindsa/dkb-robo.git to commit 2022269004878a7bd91c948ccf05417ff2d37172

>>> from dkb_robo import DKBRobo
>>> dkb = DKBRobo("user", "pass", legacy_login=True)
>>> dkb.__enter__()
check your banking app and confirm login...
>>> dkb.account_dic
{0: {'name': 'xzy', ...
>>> dkb.get_transactions("https://www.dkb.de/DkbTransactionBanking/content/banking/financialstatus/FinancialComposite/FinancialStatus.xhtml?$event=paymentTransaction&row=0&group=0", "account", "01.01.2022", "01.01.2023")
[{'bdate': '30.12.2022', 'vdate': '3..

👍

Can you please test with legacy_login=False option to use the new web-frontend?

legacy_login=True uses the old login method. Sorry for not being precisely enough.

No worries, i tested both.
The only difference is that the name of my 2FA device is shown with legacy off:

>>> from dkb_robo import DKBRobo
>>> dkb = DKBRobo("user", "pass", legacy_login=False)
>>> dkb.__enter__()
check your banking app on "DKB-App auf xyz" and confirm login...
<dkb_robo.dkb_robo.DKBRobo object at 0x7f03d2600160>
>>> dkb.account_dic
{0: {'name': '...

If the name of the 2FA is the only difference you noticed my code works as expected :-) Thank you for your confirmation...

Enhanced the code by an option to select the 2FA device from a list:

Pick an authentication device from the below list:
[0] - DKB-App on Google Pixel 6
[1] - DKB-App on iPad
:0

In case you have a chance please test this as well.

Unfortunately i only have one device :(. Maybe somebody else could help out!