简体   繁体   中英

Send HTTP Request to Apple Music

I'm playing around to add music to Apple Music. I record the request with " Charles " and can add it to my library again after I deleted it after I click repeat selected request . Is it possible to send request with javascript? I tried it with song title 368207161 but it doesn't work

    var headers = {
    'X-Apple-Private-Listening':'false',
    'X-Apple-Store-Front':'143445-2,32',
    'Client-iTunes-Sharing-Version':'3.15',
    'Accept-Language':'en-GB;q=1.0, de-AT;q=0.9',
    'Client-Cloud-DAAP-Version':'1.3/iTunes-12.9.0.164',
    'Accept-Encoding':'gzip',
    'X-Apple-itre':'0',
    'Content-Length':'77',
    'Client-DAAP-Version':'3.13',
    'User-Agent':'iTunes/12.9 (Macintosh; OS X 10.14) AppleWebKit/606.1.36.1.9 (dt:1)',
    'Connection':'keep-alive',
    'Content-Type':'application/x-dmap-tagged',
    'X-Dsid':'<value deleted>',
    'X-Guid':'<value deleted>',
    'Cookie':'<value deleted>'
 };
        var myRequest = new Request("https://ld-5.itunes.apple.com/WebObjects/MZDaap.woa/daap/databases/1/cloud-add","POST",headers,"368207161");
        var exchange = httpClient.send(myRequest);

No, this is not possible. This internal API is not intended for web use, and does not allow cross-domain requests.

If you want to allow users to add music to their Apple Music account, use an embedded Apple Music player. You can create these embeds using the Apple Music Toolbox .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM