const at = await audiotool({ clientId, redirectUrl, scope })
if (at.status === "authenticated") {
// at IS the client
const projects = await at.projects.listProjects({})
console.log(`Logged in as ${at.userName}`)
}
if (at.status === "unauthenticated") {
if (at.error) {
console.error("Auth failed:", at.error)
}
showLoginButton(at.login)
}
Result of the browser authentication flow.
When
statusis"authenticated", this object IS the Audiotool client - you can callprojects,open, etc. directly on it.