I am trying to set up a automated 1p savings challenge on my Starling Bank Account.
I have found some example code and got the starling-api-web-starter-kit up and running.
the example code I have uses a function to move the money into a savings goal, but to do that you need to first get the savings goal UID, which I should be able to get using the SavingsGoal (https://starlingbank.github.io/starling-developer-sdk/docs/1.0.0/SavingsGoal.html#getSavingsGoals)
as I am new to javascript I have no idea how to call the functions and retrieve the UID for a savings goal. I tried this but it fails:
const savingsGoalsResponse = await client.savingsGoal.getSavingsGoals({ accessToken }); savingsGoalsResponse.forEach(function(goalUid) { console.log("goalUid=", goalUid); });
any help would be appreciated.
2.1m questions
2.1m answers
60 comments
57.0k users