Retrieve song through websocket

Solved!
Reply

Retrieve song through websocket

StrangerThings
Casual Listener

Hello,

 

Recently, I was trying to understand how Discord implemented Spotify on their server and noticed it was something totally different (websocket connection).

 

As i'm a curious person, I decided to re-do the same process as Discord does but when creating a subscription on this API (which will notice you of current playing through websocket): https://api.spotify.com/v1/me/notification/player, i'm getting an "unathorized".  If I use an access_token from Discord, it works fine.

 

I thought I was doing something wrong (bad access_token etc) but apparently, it seems only Discord is allowed to use this API (maybe i'm wrong).

 

My question is: If a big company decides to implement the same way as Discord (and not through API because they want real time stuff), how should they do it? Do they need to contact Spotify personally?

 

Thank you for your answer/help.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution!

Re: Retrieve song through websocket

Hubo
Rock Star 16
Rock Star 16
Hey there, help's here!

Right now, Web Sockets are currently not available for all developers. The right folks are aware that this is something you'd like to see and your feedback reaches the right folks loud and clear.

Discord has a partnership with Spotify, you can read more about this here: https://support.spotify.com/article/discord/.

If you'd like to get in touch with the team to apply for Spotify API use in a commercial app, I recommend filling this out: https://docs.google.com/forms/d/e/1FAIpQLScawLOKdjegmKoIan9CJRiqrXDmBJ5-rLPa29hXJkSUPC1SCA/viewform. Let me know if you have any questions!

Have a great day,
Hubo
HuboRock Star 16
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.

View solution in original post

4 Replies
Solution!

Re: Retrieve song through websocket

Hubo
Rock Star 16
Rock Star 16
Hey there, help's here!

Right now, Web Sockets are currently not available for all developers. The right folks are aware that this is something you'd like to see and your feedback reaches the right folks loud and clear.

Discord has a partnership with Spotify, you can read more about this here: https://support.spotify.com/article/discord/.

If you'd like to get in touch with the team to apply for Spotify API use in a commercial app, I recommend filling this out: https://docs.google.com/forms/d/e/1FAIpQLScawLOKdjegmKoIan9CJRiqrXDmBJ5-rLPa29hXJkSUPC1SCA/viewform. Let me know if you have any questions!

Have a great day,
Hubo
HuboRock Star 16
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.

View solution in original post

Re: Retrieve song through websocket

StrangerThings
Casual Listener

Hello Hubo,

 

Thank you for your kind answer.

 

If I understood well, the company would need to fill this doc (https://docs.google.com/forms/d/e/1FAIpQLScawLOKdjegmKoIan9CJRiqrXDmBJ5-rLPa29hXJkSUPC1SCA/viewform) to have an access to this Websocket feature?

 

Best regards,

Re: Retrieve song through websocket

Hubo
Rock Star 16
Rock Star 16
Hey @StrangerThings, thanks for getting back to me.

Sorry for the confusion here. That form is to apply for permission to integrate Spotify in a commercial app. This does not grant access to the Websocket features. Right now, this feature isn't available to all developers. Hopefully, it'll be released for all developers soon. Let me know if you have any questions!

Have a great day,
Hubo
HuboRock Star 16
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.

Re: Retrieve song through websocket

StrangerThings
Casual Listener

Hey Hubo,

 

Oh alright, it makes sense now.

 

Any ETA on when it will be released ? (if you know) The company where I am on, is interested to implement it 😄

 

Hopefully i'm not asking too much ...

 

Thank you!

SUGGESTED POSTS