PromyLOPh / pandora-apidoc

pandora.com API documentation
https://6xq.net/pandora-apidoc/
Do What The F*ck You Want To Public License
48 stars 19 forks source link

Question: musicToken returned from addSeed/getStation #19

Open anonpenguin opened 8 years ago

anonpenguin commented 8 years ago

I noticed that music.addSeed / station.getStation in the Stations API return a hex-encrypted musicToken:

{
    "stat": "ok",
    "result": {
        "artistName": "Foo Fighters",
        "musicToken": "3bcf3f314419f974",
        "seedId": "2123197691273031149",
        "artUrl": "http://cont-dc6-1.pandora.com/images/public/amg/portrait/pic200/drP900/P972/P97242B3S6P.jpg"
    }
}

This doesn't seem to be the same musicToken as the one returned from music.search, i.e. when you try to use it toe create a new station you get an error. I tried decrypting it with the passwords from Partner passwords, but it looks like it's returning mostly junk bytes.

Any idea what this could be/how to decrypt it?

PromyLOPh commented 8 years ago

Encrypting the musicToken doesn’t make sense. It’s probably just a hex-encoded integer value. I don’t know why this musicToken is different from those returned by music.search and what it is used for.

JasonLG1979 commented 7 years ago

The musicToken returned from a search is actually a musicId. As in just like the musicId's returned in the songs in a playlist. AFAIK the only way to get the musicToken(again really a musicId) from the seeds is to do a search on the seed's description in the above case "Foo Fighters" you would use that musicToken to create your new station. But before you create your new station you'd have to delete the seed from the other station. You can't have 2 stations with the same seed. If you want the actual musicToken of a song in a playlist you can use it's musicId with music.getTrack. music.getTrack will get you a musicToken for the song that's comparable to the musicToken's returned in the station seeds.