Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Help Needed: Spotify Device Not Available When App or Tab Is Closed

Help Needed: Spotify Device Not Available When App or Tab Is Closed

Hi everyone,

We are a home and hotel automation company. We’ve recently introduced a feature where users can control their room ambiance using predefined scenes such as "Party Scene", "Morning Scene", and so on. When a user activates a scene like "Party Scene", our system automatically adjusts the lights and starts playing a Spotify playlist selected by the user.

We have successfully integrated the Spotify Web API and can control music playback. However, we’re facing a serious issue:

If the user closes the Spotify app or browser tab (in the case of Web Playback SDK), we get a "device not available" error. As a result, only the lights respond to the scene, but the music does not play. This breaks the experience and leaves users disappointed.

We are looking for a solution to handle this gracefully on both the frontend and backend. Ideally, we want to:

  1. Detect when no active device is available.

  2. Automatically switch to or prompt the user to open a valid device.

  3. Ensure the experience is seamless with minimal user effort.

If anyone has faced a similar situation or has any suggestions, we would really appreciate your help.

Thank you in advance!

Best regards,
Runjun kumar

Reply
1 Reply

Hi @Runjunkumar 

Thank you for posting in the Spotify Community, and Welcome!

You wrote your app also targets hotels. Be aware that it is prohibited to use Spotify in a business setting.

Instead, business should use Soundtrack.

Soundtrack can import Spotify playlists, and has its own API.

Let me know how it goes!

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts