Sign in to the API through the app's login flow, as its sign-in page does it: a token for the steps of the API.
Examples
Given I am signed in to the smart home's API as "admin"
Given we are signed in to the smart home's API as "admin"
And I am signed in to the smart home's API as "admin"
Given I am signed in to the smart home's API as "admin"
And we are signed in to the smart home's API as "admin"
Pattern
Given(/^(?:I am |we are )signed in to the smart home's API as "([^"]*)"$/, …)
Part of @webship-js/home-assistant-steps (github.com/webship/home-assistant-steps), a step pack for Webship-js 2.0.x.