How can I get a secret link for a track sent to Soundcloud in Python?

I am developing a simple application using Python where I can send tracks to my own Soundcloud account. I would like to get the "Secret Link" URL for the track I am posting. For example, I get the last track as follows:

track = client.get('/me/tracks', limit=1)[0]

The track is configured as confidential. He suggests in Docs something like this should return a secret token:

client.get('/tracks/%d/secret-token' %track.id)

However, I get HTTPError: 404 Client error: not found. It seems that all other sub-resources are working. This sample code, for example, works the way you expect:

comments = client.get('/tracks/%d/comments' %track.id)

for comment in comments:
    print comment.body

, , , , . ? .

+5
1

/me/tracks Track, secret_token, uri secret_uri.

track = client.get('/me/tracks', limit=1)[0]
print "Secret Token: %s" %track.secret_token
print "Track URI: %s"  %track.secret_uri

, client_id URI, 401.

: , ,

+1

All Articles