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
401 error on fetching playlist iOS #230
Comments
Hi there, is the user you are trying to get the playlist from the same that you authenticated? |
It doesn't matter what user they are authenticated as because they are requesting the Good spot though, they aren't actually authenticated as a user at all! They are using a
@MusicMonster20 check out: https://developers.soundcloud.com/docs/api/guide#authentication TL;DR you should be using |
good catch, thanks @mgoodfellow |
Hi, kindly check this: https://prnt.sc/Qqk_cCq9Iyde there is an error of invalid_grant. |
If I had to guess, which is all I can do - I would say you have not sent your redirect_uri exactly as it is configured for your app. The example you gave in your first comment doesn't look like the right form. Why would it end in |
Hi, so you mean we do not require refresh_token= at the end ? |
Go to https://soundcloud.com/you/apps - copy what you have listed as the Redirect URI and put as the |
Hi, yes we used that it gives us invalid_grant error: https://prnt.sc/nxK1j83m2kCl |
Hi Everyone,
We are implementing sound cloud functionality in our iOS app and trying to fetch the user playlist.
We are using the following API to get access token:
curl -X POST "https://api.soundcloud.com/oauth2/token" -H "accept: application/json; charset=utf-8" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=client_credentials&client_id=**********************&client_secret=**************************&code=3-292653-1184522413-9z87Q1rA8mpxH&redirect_uri=https%3A%2F%2Fmywebsite%2Fauth%2Fsoundcloud&refresh_token="
And after getting access token successfully, we are hitting following API to get the playlist
curl -X GET "https://api.soundcloud.com/me/playlists?show_tracks=true&linked_partitioning=true&limit=2" -H "accept: application/json; charset=utf-8" -H "Authorization: OAuth 2-292653--ATesTnYIoWRn4pClxLh67BD
We are getting 401-Unauthorized error every time. What we are missing here ? Kindly advise. Thank you in advance.
The text was updated successfully, but these errors were encountered: