I have been trying to use the getToken function but it fails with the error:
“Unable to initialize app TypeError: this.homey.flow.getToken is not a function”
I have created a very simple test case:
async onInit() {
this.homey.flow.createToken('tomorrowsBestPrice', { type: 'string', title: 'Best export price', value: 0 });
const token = this.homey.flow.getToken('tomorrowsBestPrice');
}
But even this fails when calling getToken, maybe I’m missing something obvious but I can’t see why this doesn’t work, does anyone have any suggestions? The SDK documentation seems to suggest that this should work ManagerFlow - Homey Apps SDK v3 and the various other functions for getting flow cards seem to work fine.
Previously I was getting round this by just storing the token returned by the createToken function but after some restructuring of my code it would be easier if I could use getToken.