Script to retrieve and store the access_token
and refresh_token
to use for Saxo Banks Api.
Using Microsofts playwright to interact with the activation and token endpoint from Saxo Bank. Then using ExpressJs
to setup a callback api to grab the access_token
. The access_token
and refresh_token
are both stored in the token.json
. This is all handled by get_token.py
-
Clone this repository
-
Install Node.js
-
Run
pip install -r requirements.txt
-
Run
playwright install
-
cd into
.\callback
and runnpm install express
-
Fill out
.\userInfo.json
-
Run
npm run start
in.\callback
-
Run
get_token.py
-
Enjoy, you can now use the
access_token
stored intoken.json
, the python script will refresh the token by itself.
Contributions are always welcome!
If you have any issues or questions, please contact me with provided information.