Tracks on private playlist (with secret_token) generating 404 error on stream

Open
#74 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
api

Research direction

Start at the SC.stream entry point and reproduce the two requests shown in the issue for a private track and playlist secret token. Compare the failing /tracks/[trackid] request with the working /tracks/[trackid]/stream request, then verify that private playlist streaming no longer returns 404.

Written by the indexing model from the issue text.

Description

Streaming a private track from a private playlist used to work fine as long as you used the playlist's secret token. It now generates a 404. This started happening yesterday (Dec. 7, 2016).

SC.initialize({
    client_id: xxxxxxxxxxxxxxxx,
    redirect_uri: xxxxxxxxxxxxxxxx
});
SC.stream('/tracks/[trackid], [playlist_secret_token]).then(function(data) {
    data.play();
}).catch(function(error) {
    alert('Error! ' + error.message);
});

The error:
Failed to load resource: the server responded with a status of 404 (Not Found)

What's interesting is that this generates an error:

https://api.soundcloud.com/tracks/[trackid]?secret_token=[playlist_secret_token]&format=json&client_id=xxxxxxxxxxxxxx

While this resolves correctly:

https://api.soundcloud.com/tracks/[trackid]/stream?secret_token=[playlist_secret_token]&format=json&client_id=xxxxxxxxxxxxxx

Is anyone else having this problem? Did anything change in regards to playlist secret tokens?

Dominant language
JavaScript
Stars
388
Forks
76
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from soundcloud/soundcloud-javascript

All issues in soundcloud/soundcloud-javascript

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.