URL schema to get users and playlists a Beats Music user is following

119 views Asked by At

We have our access_token and various GETs work fine, etc.

However, when we try to to get a list of items that the currently logged in user follows, the server responds with a user not found error.

To be clear, the URL:

https://partner.api.beatsmusic.com/v1/api/users/249651278634942464/follows?access_token=...&client_id=...&user_context=249651278634942464

returns:

{"code":"ResourceNotFound","message":"User: not found."}.

Yet this URL returns valid results: https://partner.api.beatsmusic.com/v1/api/users/249651278634942464/mymusic/tracks?access_token=...&client_id=...&user_context=249651278634942464

So what's the right way to form the URL to get the assets the logged in user follows? I've been over the web API docs a million times and it the first URL is what it seems to suggest.

1

There are 1 answers

6
DuchessSF On

To retrieve follows for a users, you just need the user ID and access token only. You do have the option to use the filters on the docs.

Example: https://partner.api.beatsmusic.com/v1/api/users/ID/follows?access_token=....

*Note: Setting a limit is optional, but if the user follows higher than 200 assets, you will only receive the maximum of 200 using the API.