Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundCloud API randomly returns 403 #114

Open
lealoureiro opened this issue Apr 21, 2020 · 8 comments
Open

SoundCloud API randomly returns 403 #114

lealoureiro opened this issue Apr 21, 2020 · 8 comments

Comments

@lealoureiro
Copy link

Hi Guys,

I'm using Mopidy-Soundcloud extension and the API sometimes returns 403 code when i want to play a set:

Got ERROR bus message: error=GLib.Error('Forbidden', 'gst-resource-error-quark', 15) debug='gstsouphttpsrc.c(1431): gst_soup_http_src_parse_status (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin2/GstSoupHTTPSrc:source:\nForbidden (403), URL: https://cf-media.sndcdn.com/dYSpqOXuN4m7.128.mp3?Policy=xx&Signature=xx&Key-Pair-Id=xx, Redirect to: (NULL)'

This makes the plugin very unstable.

Regards,
Leandro

@kingosticks
Copy link
Member

You probably hit the API's daily rate limit. Soundcloud, over years and years now, have done nothing to address their woefully inadequate API rate limits, or anything to better secure their endpoints. When people hammer the endpoints using our code (due to bugged software or unhelpful behaviour or whatever) they eat up our allowance. You can't even get apply for a new API account these days. I've previously tried to minimise our hits but I'd welcome anyone else having another go. Else there's nothing we can do about this.

@kingosticks
Copy link
Member

Or, will trying to play a different set then work afterwards? I'd love it if this was not a rate limit problem.

@lealoureiro
Copy link
Author

Other sets works, but not all...

So the fight is always to find one that works :(

But same set was working and able to listen yesterday night, 1st time this morning is failing ...

@kingosticks
Copy link
Member

kingosticks commented Apr 21, 2020

I guess if you could try and work out the uri difference for a given set when it works and doesn't that might help. But ultimately when a soundcloud endpoint gives us a 403 I'm not sure what we can do. Especially since it was their API response that provided us with that CDN media URI.

It'll be tricky to fix this as they don't support API users. Maybe comparing with accessing this set on their official app might be helpful.

@lealoureiro
Copy link
Author

What you mean by work out the URI?

@kingosticks
Copy link
Member

You said that set worked at some point. And there might be some difference between the CDN uri provided by soundclouds API when it worked and when it didn't work. Can we guess what might be the problem. And maybe if we are really really really lucky there is something we can do about it.

@lealoureiro
Copy link
Author

Is that one visible in playlists in file system or only when we press play in interface via logs?

@kingosticks
Copy link
Member

In the logs only, I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants