Posts

Post not yet marked as solved
0 Replies
410 Views
Currently, the API response when a playlist is created is something like the following:{ data: [ { id: 'p.2P6WJGpsxa7V2E', type: 'library-playlists', href: '/v1/me/library/playlists/p.2P6WJGpsxa7V2E', attributes: { playParams: { id: 'p.2P6WJGpsxa7V2E', kind: 'playlist', isLibrary: true }, artwork: { width: 1200, height: 1200, url: 'https://is1-ssl.mzstatic.com/image/thumb/Features127/v4/75/f9/6f/75f96fa5-99ca-0854-3aae-8f76f5cb7fb5/source/{w}x{h}bb.jpeg' }, canEdit: true, description: { standard: 'Made with Playlistify - https://playlistify.app' }, name: 'Claptone - The Masquerade Ibiza In A Mix 2019-08-12' } } ] }This response includes an id (‘p.MoGJB2OSlR3vdb’) which cannot be used to embed the playlist. Furthermore, there exists no endpoint for translating this id to one that can be used for the embed code. Note the id used in the embed code below (obtained through iTunes) for the same playlist is different than the API’s response.<iframe allow="autoplay *; encrypted-media *;" frameborder="0" height="450" style="width:100%;max-width:660px;overflow:hidden;background:transparent;" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-storage-access-by-user-activation allow-top-navigation-by-user-activation" src="https://embed.music.apple.com/ca/playlist/claptone-the-masquerade-ibiza-in-a-mix-2019-08-12/pl.u-RRbV0X2C3kLmDa"></iframe>There does not seem to be a way to embed a playlist created via the API.
Posted
by iAligator.
Last updated
.