Example of how to access personal playlist outside of iOS

I have confirmed that I can, using javascript and nodejs, generate developer token and use it to access and search the music catalog.

I need, however, to access playlists and other personal data. A prerequisite for this is to obtain the 'music user token'. I have found a few examples on how to do this in iOS but I need to do this outside of iOS, preferable on nodejs running on linux.

Does anyone know of an example on how to generate the 'Music User Token' using plain restfull API?

Many thanks,

Fred.