Closed kartikeyvaish closed 3 years ago
The API you're using is v4 I suppose. For this version you'll need to decrypt the encrypted_media_url
to get the stream able link / download link. Otherwise you can pass the encrypted_media_url
to another API endpoint from JioSaavn that handles auth. You can get that endpoint on jiosaavn, check the network tab in your browser when you make a request for to play a song.
Is there any way to decrypt encrypted_media_url
or do you have another endpoint for Download Link.
. I looked for it on JioSaavn page but couldn't find
How to use this endpoint
? I mean what Query Parameters has to be passed?
I used encrypted_media_url
from the above result (See the very first comment in this issue it has a key named as encrypted_media_url
).. So in my case
encrypted_media_url = "iPPGVzyogeiPwpro65A0eUaQggN+8+J4ysj4woduBtXAS270uIcGXiF4bDaGWx6VUNiDciXdhLU7souFj8Dv3YPzFaL/aK97"
I entered this URL in address bar and got this response -
Request URL = https://www.jiosaavn.com/api.php?bitrate=320&api_version=4&_format=json&ctx=web6dot0&_marker=0&__call=song.generateAuthToken&url=iPPGVzyogeiPwpro65A0eUaQggN+8+J4ysj4woduBtXAS270uIcGXiF4bDaGWx6VUNiDciXdhLU7souFj8Dv3YPzFaL/aK97
Response that I got
{
auth_url: false,
status: "success"
}
You need to URL encode the encrypt_media_url
first.
so the url will look like https://www.jiosaavn.com/api.php?__call=song.generateAuthToken&url=iPPGVzyogeiPwpro65A0eUaQggN%2B8%2BJ4LaRIpSa2Dhfw2i%2FtkExdtN99%2BIdTGUa2rhm2Nt4A99Ail%2BV95E4o%2F4PzFaL%2FaK97&bitrate=128&api_version=4&_format=json&ctx=web6dot0&_marker=0
{
auth_url: "https://ac.cf.saavncdn.com/210/6878daf1737dcbd57b99677f085952d1_160.mp4?Expires=1617692123&Signature=KOpaIH9wHuI~9ybbm-pAl0-wKFdAaRkadjpPgFvV4BuzNG1m5rrmghxa5D-IRp62tXQWPd6dp9qhQbxYXqPbPN5l5UMMcOGrWuL10~sA7E0rh-cRsqFHyF1tejaWbxfALUqXC8k4e1O5XWasELtuVQzK9dLzQb0YgqEZoLPHcmJAkUuZSokhy0UnIU85S~O7aRt2CE473WjhLCfd8i-7BOFaZgtI0Y3uESVHKcwMHcd1S5zb2usxPt3W9k-4kZ9QDkMtgmZSbNkilHYo87ddGktMcVFyGLzL1s9B9pu52TpHj6UOppkYVHRreTYwIza~OhivQwz~DoNeG2ejcu8KTA__&Key-Pair-Id=APKAJB334VX63D3WJ5ZQ",
type: "mp4",
status: "success"
}
So now I get this response but this link provides a .mp4
file.
Is there any way to get .mp3
format or .m4a
?
convert it. or just the API i made :/
Converting will not insert proper metadata Album Art etc to the file..Anyway
Nice Work....Thanks for the help
you can use external tools to write metadata. im working on a spinoff project, which will give songs in mp3 with proper metadata using this API
I was trying to make JioSaavn Downloader for my personal use using React Native
where I will enter the URL of the song and download the file and Save it into Music Folder in my phone.
So, my aim was to get .mp3
or .m4a
download link from these endpoints.
But unfortunately I couldn't get the proper Download Link
.
I will look for a workaround.
I'm working on a similar thing
Excellent!.. Please ping me if you get any update on this.. 🙏🙏🙏
Sure
Any Update @sumitkolhe
Not getting enough time nowadays.
@sumitkolhe Any Updates man??
@sumitkolhe Any Updates man??
Have tested a few things. Seems to be working. Will push the changes in few days
I've reached till here using apisauce.. I am getting this response. As you can see
Download Link
is not present in this response. How to get thedownload link
inmp3
orm4a
format??