syncforynab / fintech-to-ynab

Automatically push Monzo and Starling transactions into YNAB in real time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use "Nordic API Gateway" to support nordic banks

duch11 opened this issue · comments

As I wrote in #73 Bank Requests, I'll be trying to add support for Nordic API Gateway. It's made by Spiir, which is a great app in itself, but I want YNAB!
And I want it to support automatic transactions from Scandinavia!

My Idea is that with this PS2D "Nordic API Gateway", we'll be able to automatically import the transactions from a bank account, into a YNAB account. The API handles user authentication in a separate login window, and then grants access to the transactions.
Link: https://developer.nordicapigateway.com/

In the coming days, I'll be looking into how the API works, and how this Projects innards are working, I'll be posting my progress and conclusions here.

Awesome 👍 let me know how your research pans out.

My conclusions so far:

I'm still lacking understanding of how this project actually works, it's my first time with ruby.
How is the program flow?
Where is the main method?
Where would I write code, to support a new API?

In regards to the API, it seems pretty straight forward, but I'm puzzled by what the "Redirect URL" would be?
API Getting started

Ah, it requires oAuth. I am not sure that is going to work then. We do not have anywhere to store the access tokens etc (we have no databases - and i am 100% against introducing one).

As for where you would write them, take a look at the others in https://github.com/fintech-to-ynab/fintech-to-ynab/tree/master/app/services/import

Thank you.
In regards to oAuth, would it be acceptable to store it in a local file, if the program were to run locally on ones own machine?
Would there be a workaround?

The problem is that most people run it via Heroku, and as soon as they do a deploy, it's all lost. That will result in a lot of confusion.

Right now, i think the best option is to just build the importer with the ability to pass in the token, like we do with Monzo. Keep all of the oAuth logic outside of the app until we can think of a solution for it.

For me personally, i have a seperate little service that stores/refreshes Monzo tokens. I then assign that to an ENV var via a bash script. And then i pass that into the Fintech to YNAB importer.

Thank you for your help :) 👍
I'll be making some sort of solution for this, but maybe not on this project then.
But totally understandable, confusion is a bad thing, it would be better to have a separate project for services that require oAuth :)
I'll try to look for that instead then :)

Hi @duch11, did you get any further with this? I am also looking into automating imports from Danish banks to YNAB.

Ok. In the meantime I’ve created a small node.js script that exports my bank transactions using Nordic API Gateway and imports them into YNAB directly using the public YNAB API.

The script is not very generic, very much built for my purposes but I do want to make it available in a more widely usable format. I'll post in here when I do. :)

It's using oAuth, so we cannot really add it here as we don't have a database in this application to store the access tokens etc.

However, if someone wants to reach out to me at scottymeuk (at) gmail.com, i can look at adding it to syncforynab.com