fondberg / spotcast

Home assistant custom component to start Spotify playback on an idle chromecast device as well as control spotify connect devices
Apache License 2.0
640 stars 94 forks source link

Cannot retrieve list of devices #395

Closed norimicry closed 10 months ago

norimicry commented 11 months ago

Bug Ticket

Describe the bug

I am unable to retrieve a list of device ID's. Using the Spotify API documentation instructions, I am getting an "invalid username" error. The instructions included in the README do not reflect the existing instructions on the Spotify Doc site as the web api console is no longer there.

Troubleshooting

Make sure to validate all the elements before submitting the ticket (Exception to the steps marked as optional)

Environment

fcusson commented 11 months ago

@cavazoshj. This is because you are using the wrong authentication method. The problem is not with Spotcast. You are using the client method, but trying to access a user endpoint. see ticket in spotify support

If you want to access user information, you will need oauth 2.0 level tokens. Getting to that endpoint without the web console is much more complex. If you have some knowledge of Python you could use spotipy to get the information.

I'll keep the ticket open to remind we need to update the documentation, but this is mot something that will be fixable quick on my end.

Jacksonbm1 commented 6 months ago

Hey, you wrote "Getting to that endpoint without the web console is much more complex". I'm confused how you even get to the web console. Could you point us in the right direction?

fcusson commented 6 months ago

@Jacksonbm1 simply use this link. At the time of this ticket the web console was deprecated and favor of a new development platform that spotify was working on. There was a small window when there was no web console available, but this is no longer the case.

Jacksonbm1 commented 6 months ago

Thank you. I was trying to, but there's a lot more steps it seems that aren't covered in the docs. Is there any chance that will be updated or that you have a resource for me to follow along? For example, it seems to want me to get oauth2, but I can't figure out how to configure that

Jacksonbm1 commented 6 months ago

Actually, I think I figured it out. I'm going to submit a PR when I get a chance to explain this, but if I don't please feel free to bump me