Danske Bank API

by Mik on November 15th, 2011

Hello! So I got this comment from Kristian in my latest post about a peak inside the Danske Bank iPhone app. To share my efforts, you can download my DanskeBankAPI in .NET here. At the time it supports checking your accounts, searching and paging through transactions etc., but not actually making an transaction.The example app to show some functionality is:

A simple example code for using the API is (actually the code for the above form):

  1. db.createSession();
  2. db.login(textBox1.Text, textBox2.Text);
  3. Models.Account[] acc = db.getAccounts();
  4. if (acc.Length > 0) label1.Text = acc[0].Balance.ToString();

The first line creates a session (required) and the next line logins using two textboxes (and the CPR and mobilbank code). The latest two lines simple gets the accounts and prints the first accounts balance to a label.

Download and test out the project if you want, all the source is right there, so take a look if you are suspicious.

4 Comments
  1. variant permalink

    Is this likely to work on the Swedish Danskebank as well? I guess changing a few strings would at least be required.. like

    “https://mb.danskebank.dk/smartphones/gmb.svc/Accounts/”

    Etc

  2. variant permalink

    Excellent work btw!

  3. I definitely think this would work on the Swedish Danske Bank as well – if you just modify the URL’s, maybe that would do the trick.

    To be sure you can sniff the traffic using Charles and set up the proxy on an iPhone just like I did :-)

  4. Kim permalink

    This is SWEET & EXCELLENT! Is it however still working – I can’t seem to get it to work. Could they have changed their API format, or?

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS