Context
I am trying to make webservice that fetches the users name and email
from his 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 user you need to request a user token with Apple MusicKit JS library.
For fetching the name and email of the user I use this oauth2 client that uses the signin with Apple functionality.
Problem
A Using the apple music kit... I can not query any
user profile data. At least I cannot seem to find an example of this. If there is a possibility to get user email and name using this route?
B Using the Sign in with Apple oauth flow I receive
an access token which contains the name and email. But I cannot use the token to query the apple music api. It seems their scopes are limited to name and email...and no music or something. Is there a possibility to get an user token that can be user on the music api?
C Are there any other possibilities to accomplish
this without requiring the user to sign in twice on apple (once for the email and once for pushing the Song to his library)
PS: I also asked this question on stackoverflow
https://stackoverflow.com/questions/67649023/use-token-from-sign-in-with-apple-to-query-apple-music-api
Topic:
Media Technologies
SubTopic:
General
Tags:
MusicKit JS
Apple Music API
Sign in with Apple
Sign in with Apple REST API