Skip to content

Getting a 403 error when trying to stream track #1

Description

I'm getting strange behavior when trying to access the track stream. The is further complicated by the fact that it is not consistent across all tracks. Some tracks will occasionally work, and then stop. I have a slightly better experience when running this locally, vs on my hosting platform (godaddy).

Here's the code:

        public FileStreamResult Track(string id) {
            var clientId = ConfigurationManager.AppSettings["soundCloudClientId"];
            var clientSecret = ConfigurationManager.AppSettings["soundCloudClientSecret"];
            var username = ConfigurationManager.AppSettings["soundCloudUserName"];
            var password = ConfigurationManager.AppSettings["soundCloudPassword"];

            ISoundCloudConnector soundCloudConnector = new SoundCloudConnector();
            var soundCloudClient = soundCloudConnector.DirectConnect(clientId, clientSecret, username, password);
            using (var fileStream = soundCloudClient.Track(id).GetStream()) {
                return new FileStreamResult(fileStream, "audio/mpeg");
            }
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions