Closed 3DJakob closed 3 years ago
I tried the sample code in your readme however I cannot seem to be able to connect to the server due to being on a different URL. Have they closed down the API to internal use only or am I missing something?
avanza.authenticate({ username: 'myUserName', password: 'myPassword', totpSecret: 'mySecret' }).then(async () => { const positions = await avanza.getPositions() console.log(positions) })
Browsers do not allow you to connect to other origins. You'll have to run it on the server-side, or in a framework like Electron.
Yup thought so much. Got it working in electron 👍
I tried the sample code in your readme however I cannot seem to be able to connect to the server due to being on a different URL. Have they closed down the API to internal use only or am I missing something?