[GH-ISSUE #1143] Okay my plan is to use librespot to change the user spotify device to librespot. #534

Closed
opened 2026-02-27 19:31:09 +03:00 by kerem · 1 comment
Owner

Originally created by @PetrNezbeda on GitHub (Apr 9, 2023).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1143

Okay my plan is to use librespot to change the user spotify device to librespot.

I builded a nodejs api that starts librespot with this following code

        this.librespotProcess = spawn('/root/.cargo/bin/librespot', [
            "-n",
            "Betty Spotify Sync",
            "--backend",
            "pipe",
            "--initial-volume",
            "75",
            "-u",
            `${this.currentUser.display_name}`,
            "-v",
        ]);

The question is now can I just set the user device with /me/player to librespot? and if yes how do I get the device id of liberspot?

Some other infos: I only have the username and the access_token with enough rights of a user.
(Yes this all is wanted by the target user its nothing ilegal!)

Is this even possible with librespot?

Thanks for any reply!

Originally posted by @fb-sean in https://github.com/librespot-org/librespot/discussions/1142

Originally created by @PetrNezbeda on GitHub (Apr 9, 2023). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1143 Okay my plan is to use librespot to change the user spotify device to librespot. I builded a nodejs api that starts librespot with this following code ```JS this.librespotProcess = spawn('/root/.cargo/bin/librespot', [ "-n", "Betty Spotify Sync", "--backend", "pipe", "--initial-volume", "75", "-u", `${this.currentUser.display_name}`, "-v", ]); ``` The question is now can I just set the user device with /me/player to librespot? and if yes how do I get the device id of liberspot? Some other infos: I only have the username and the access_token with enough rights of a user. (Yes this all is wanted by the target user its nothing ilegal!) Is this even possible with librespot? Thanks for any reply! _Originally posted by @fb-sean in https://github.com/librespot-org/librespot/discussions/1142_
kerem closed this issue 2026-02-27 19:31:09 +03:00
Author
Owner

@dspearson commented on GitHub (Apr 11, 2023):

Not really a question related to this project. You're asking how to use the Web API.

I suggest you read the Spotify Web API documentation, specifically get available devices (where you can obtain the device_id), transfer playback & start/resume playback (you can see device_id is a parameter for example).

<!-- gh-comment-id:1502705845 --> @dspearson commented on GitHub (Apr 11, 2023): Not really a question related to this project. You're asking how to use the Web API. I suggest you read the Spotify Web API documentation, specifically [get available devices](https://developer.spotify.com/documentation/web-api/reference/get-a-users-available-devices) (where you can obtain the device_id), [transfer playback](https://developer.spotify.com/documentation/web-api/reference/transfer-a-users-playback) & [start/resume playback](https://developer.spotify.com/documentation/web-api/reference/start-a-users-playback) (you can see device_id is a parameter for example).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#534
No description provided.