getToken for Flows not working

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.

Doesn’t seem to be implemented despite what the documentation states.

Issue created: `this.homey.flow.getToken` is not a function · Issue #277 · athombv/homey-apps-sdk-issues · GitHub

Well, that would explain that! Assumed I was missing something obvious, but good to know it’s not just me being dim.

Guess I’ll have to rework my code to continue using the token returned by the createToken function.

It should exist though. See Github issue.

Apparently this got fixed in 8.1.1