401 Client Error: Unauthorized for url

Alex picture Alex · Jan 29, 2018 · Viewed 8.7k times · Source

Recently I started to get

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.soundcloud.com/oauth2/token

using soundcloud (0.5.0) Python library.

It happens in

client = soundcloud.Client(client_id='id',
                           client_secret='secret',
                           username='[email protected]',
                           password='passwd')

I double checked my credentials to make sure they are not the cause. I tried to get a Client instance from different IPs and different machines. At some random times during a day I can get a Client instance, but 99.99% of the day I get the error.

Does the error mean I was banned for some reason?

Answer