Skip to content
Client
Server

Reference / @open-music-sdk/client-user / user

Function: user() ​

ts
function user(client): tUser;

Defined in: clients/client-user/src/namespace.ts:1011

The listener's side for one client, which has to be a listener's: one made with a Music User Token. Each call makes a new one, which cannot be changed.

Parameters ​

client ​

tAppleMusicClient

The listener's client, which every function of the namespace asks with.

Returns ​

tUser

Every function of this package bound to the client, under its own name, frozen.

Throws ​

TypeError if client is no client from createClient. A client that holds no Music User Token is taken, and each call is then refused by the client, before Apple is asked.

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.