We've just started getting an 401 - invalid_grant error when attempting to upload files using the SoundCloud library mptre/php-soundcloud.
I get the same error when I try to regenerate a token:
https://api.soundcloud.com/oauth2/token?client_id=ID_HERE&client_secret=SECRET_HERE&redirect_uri={this is actually blank on our apps page}&grant_type=authorization_code&code=XXXX
My assumption is that we need to refresh the auth token, but I thought we set it to non-expiring.
How can I prevent this 401 error and upload our audio via the API?
Any help would be really appreciated .