Questions tagged [apple-musickit-js]

17 questions
5
votes
1 answer

Use token from "sign in with apple" to query apple music api

Context I am trying to make webservice that fetches the name and email from an users Apple account and place a Song or Artist in his library. For adding a Song to the library I found this apple-music-api. library. To make requests on behalf of a…
Florian
  • 725
  • 6
  • 27
5
votes
2 answers

Do Apple Music User Tokens expire?

I'm working on integrating Apple Music into my web app. I let users authenticate once, using Apple's MusicKit JS. However, I'm curious if the resulting Music User Token expires. I'm storing this token in a database, but I need to know if I can use…
Niels Kersic
  • 830
  • 1
  • 9
  • 24
2
votes
0 answers

Authorize to Apple Music via Facebook Messenger In-App Browser

We're using https://developer.apple.com/documentation/musickitjs to authorize Apple music, on Desktop it opens a new window to authorize to apple. But It's NOT working on mobile In-App Browser (both iOS & Android), probably because on mobile…
Ashish Chaturvedi
  • 1,352
  • 3
  • 13
  • 37
2
votes
1 answer

Can I get a user's display name from Apple MusicKit?

I've been going through Apple's (awful) documentation for both MusicKit, the API and MusicKit JS, but I haven't been able to find an endpoint or method to retrieve a user's display name, email or any other information that I can use to identify the…
Niels Kersic
  • 830
  • 1
  • 9
  • 24
2
votes
0 answers

Make use of recently played songs endpoint on Apple Music

I would like to make use of the "Get Recently Played Resources" endpoint of the Apple Music API. More specifically, I would like to keep track of how often a user has listened to a specific song/album. As of right now, I am not quite convinced if…
linus_hologram
  • 1,595
  • 13
  • 38
1
vote
1 answer

Error when authenticate MusicKit instance

whenever I try to authenticate a MusicKit instance the popup alway shows 'Problem Connecting There may be a network issue. '. When reloading the popup it shows the login screen, but after I did log in it shows the same error page again. On the first…
CptCookie
  • 11
  • 3
1
vote
2 answers

Using Promise and await instead of then()

I'm using MusicKit-JS and while this code works I don't know if there's another way of writing it. The music methods themselves all return __awaiter(...). Is there a way to write this using promises? I don't know much about them so couldn't get it…
Omar.Ebrahim
  • 862
  • 1
  • 10
  • 30
1
vote
0 answers

What resource types are supported by MusicKIt addToLibrary function?

My code for adding songs to user's music library looks like this: let kit = MusicKit.getInstance(); kit.authorize() .then(() => { kit.addToLibrary('1234567', 'SONGS'); }); Do you know what other types, besides SONGS, are supported?…
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
1
vote
1 answer

How to play music using Apple Music Kit JS

I'm trying to create a small player using Apple Music Kit JS but I'm having issues when playing the song. This is my current code: Hear for…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/apple-music" class="post-tag grid--cell" title="show questions tagged 'apple-music'" rel="tag">apple-music</a> <a href="../../questions/tagged/apple-musickit" class="post-tag grid--cell" title="show questions tagged 'apple-musickit'" rel="tag">apple-musickit</a> <a href="../../questions/tagged/apple-musickit-js" class="post-tag grid--cell" title="show questions tagged 'apple-musickit-js'" rel="tag">apple-musickit-js</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 15 '20 at 23:22">asked May 15 '20 at 23:22</time> <a href="../../users/11611341/ethan-lipnik" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/11611341.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ethan Lipnik" /> </a> <div class="s-user-card--info"> <a href="../../users/11611341/ethan-lipnik" class="s-user-card--link">Ethan Lipnik</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">21</li> <li class="s-award-bling s-award-bling__bronze" title="2 bronze badges">2</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-76904254"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/76904254/how-to-get-music-user-token-for-apple-music-in-nodejs" class="question-hyperlink">How to get Music-user-token for apple music in nodejs</a></h3> <div class="excerpt">I am creating a React-Native application with Nodejs on backend. My app has a feature to link apple music account with my app. for this, I need to have Music-user-token of particular user who has joined my app and for Music-user-token, I need user's…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/ios" class="post-tag grid--cell" title="show questions tagged 'ios'" rel="tag">ios</a> <a href="../../questions/tagged/authorization" class="post-tag grid--cell" title="show questions tagged 'authorization'" rel="tag">authorization</a> <a href="../../questions/tagged/apple-music" class="post-tag grid--cell" title="show questions tagged 'apple-music'" rel="tag">apple-music</a> <a href="../../questions/tagged/apple-musickit-js" class="post-tag grid--cell" title="show questions tagged 'apple-musickit-js'" rel="tag">apple-musickit-js</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 15 '23 at 07:58">asked Aug 15 '23 at 07:58</time> <a href="../../users/17264431/zohran-rasheed" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/17264431.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="zohran rasheed" /> </a> <div class="s-user-card--info"> <a href="../../users/17264431/zohran-rasheed" class="s-user-card--link">zohran rasheed</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> <li class="s-award-bling s-award-bling__bronze" title="2 bronze badges">2</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-76776261"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/76776261/apple-musickit-js-authorization-method-doesn-t-resolve" class="question-hyperlink">Apple MusicKit JS authorization method doesn't resolve</a></h3> <div class="excerpt">I'm building a Django application where I'm using Apple's MusicKit JS to authorize users and get their music library songs. I've correctly set up the MusicKit configuration in my HTML, and I am just doing this locally for testing purposes right…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apple-music" class="post-tag grid--cell" title="show questions tagged 'apple-music'" rel="tag">apple-music</a> <a href="../../questions/tagged/apple-musickit" class="post-tag grid--cell" title="show questions tagged 'apple-musickit'" rel="tag">apple-musickit</a> <a href="../../questions/tagged/apple-musickit-js" class="post-tag grid--cell" title="show questions tagged 'apple-musickit-js'" rel="tag">apple-musickit-js</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jul 27 '23 at 03:10">asked Jul 27 '23 at 03:10</time> <a href="../../users/22284158/drew-graham" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/22284158.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Drew Graham" /> </a> <div class="s-user-card--info"> <a href="../../users/22284158/drew-graham" class="s-user-card--link">Drew Graham</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> <li class="s-award-bling s-award-bling__bronze" title="1 bronze badges">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-75653084"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/75653084/typescript-definition-file-for-a-function-return-actual-property-types-or-cust" class="question-hyperlink">Typescript definition file - for a function, return actual property types, or custom property type itself?</a></h3> <div class="excerpt">I'm trying to write a TypeScript type definitions file for an external JS library, MusicKit JS. I'm fairly new to TS (and especially declaring type definitions in TS). The MusicKit docs are, at times, not very descriptive, and I'd like to avoid…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/typescript" class="post-tag grid--cell" title="show questions tagged 'typescript'" rel="tag">typescript</a> <a href="../../questions/tagged/conventions" class="post-tag grid--cell" title="show questions tagged 'conventions'" rel="tag">conventions</a> <a href="../../questions/tagged/typescript-definitions" class="post-tag grid--cell" title="show questions tagged 'typescript-definitions'" rel="tag">typescript-definitions</a> <a href="../../questions/tagged/apple-musickit-js" class="post-tag grid--cell" title="show questions tagged 'apple-musickit-js'" rel="tag">apple-musickit-js</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 06 '23 at 16:03">asked Mar 06 '23 at 16:03</time> <a href="../../users/3928128/scarlet" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3928128.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Scarlet" /> </a> <div class="s-user-card--info"> <a href="../../users/3928128/scarlet" class="s-user-card--link">Scarlet</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> <li class="s-award-bling s-award-bling__bronze" title="2 bronze badges">2</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-70507604"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/70507604/how-to-recursive-promises-in-a-loop-and-passing-argument-to-another" class="question-hyperlink">How to recursive Promises in a loop and passing argument to another</a></h3> <div class="excerpt">I've checked other threads on SO but none really answers the questions as each answer ommiting something necessary for my case, and none of it is for Apple Music. Apple API is heavily promise-based and even async/await returns promise instead of…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/node.js" class="post-tag grid--cell" title="show questions tagged 'node.js'" rel="tag">node.js</a> <a href="../../questions/tagged/es6-promise" class="post-tag grid--cell" title="show questions tagged 'es6-promise'" rel="tag">es6-promise</a> <a href="../../questions/tagged/apple-musickit-js" class="post-tag grid--cell" title="show questions tagged 'apple-musickit-js'" rel="tag">apple-musickit-js</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 28 '21 at 13:15">asked Dec 28 '21 at 13:15</time> <a href="../../users/2877248/sebastian" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2877248.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Sebastian" /> </a> <div class="s-user-card--info"> <a href="../../users/2877248/sebastian" class="s-user-card--link">Sebastian</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">448</li> <li class="s-award-bling s-award-bling__silver" title="4 silver badges">4</li> <li class="s-award-bling s-award-bling__bronze" title="14 bronze badges">14</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-69289809"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/69289809/where-do-i-put-the-user-token-for-api-request" class="question-hyperlink">Where do i put the user token for api request</a></h3> <div class="excerpt">I have this sample code to get the users albums, but where do I put the usertoken on the request.get call. I can't find anywhere online that shows where it goes. "use strict"; const fs = require("fs"); const jwt = require("jsonwebtoken"); const…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apple-musickit-js" class="post-tag grid--cell" title="show questions tagged 'apple-musickit-js'" rel="tag">apple-musickit-js</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 22 '21 at 18:53">asked Sep 22 '21 at 18:53</time> <a href="../../users/16940353/emw2006" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/16940353.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="emw2006" /> </a> <div class="s-user-card--info"> <a href="../../users/16940353/emw2006" class="s-user-card--link">emw2006</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65572658"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65572658/apple-s-musickit-js-library-example-runs-fine-when-rendered-by-node-js-fails-w" class="question-hyperlink">Apple's MusicKit JS library example runs fine when rendered by Node.js, fails with Django</a></h3> <div class="excerpt">For three hours, I've been scratching my head over this. Apple's MusicKit uses JWT tokens to authenticate. When I npm start this Node.js example project, I can generate the JWT token, and then authorize Apple Music and collect the user token in…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/node.js" class="post-tag grid--cell" title="show questions tagged 'node.js'" rel="tag">node.js</a> <a href="../../questions/tagged/django" class="post-tag grid--cell" title="show questions tagged 'django'" rel="tag">django</a> <a href="../../questions/tagged/jwt" class="post-tag grid--cell" title="show questions tagged 'jwt'" rel="tag">jwt</a> <a href="../../questions/tagged/apple-musickit" class="post-tag grid--cell" title="show questions tagged 'apple-musickit'" rel="tag">apple-musickit</a> <a href="../../questions/tagged/apple-musickit-js" class="post-tag grid--cell" title="show questions tagged 'apple-musickit-js'" rel="tag">apple-musickit-js</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 05 '21 at 03:02">asked Jan 05 '21 at 03:02</time> <a href="../../users/11809987/gwizzo" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/11809987.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="gwizzo" /> </a> <div class="s-user-card--info"> <a href="../../users/11809987/gwizzo" class="s-user-card--link">gwizzo</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">49</li> <li class="s-award-bling s-award-bling__bronze" title="8 bronze badges">8</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <div class="s-pagination--item is-selected">1</div> <a class="s-pagination--item" href="../../questions/tagged/apple-musickit-js_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/apple-musickit-js_page=2" rel="next" title="Go to page 2"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>