spencercharest / tidal-api Goto Github PK
View Code? Open in Web Editor NEWAn unofficial API wrapper for Tidal Music.
An unofficial API wrapper for Tidal Music.
I need to retrieve all my playlists. So far, I have been using getFavoritePlaylists, but at some point Tidal changed something, so that playlists I create are not part of my favorites. I checked in the webapp (listen.tidal.com), and the URL for retrieving playlists is something like https://api.tidal.com/v1/users/26690752/playlists?countryCode=DK
This returns a structure like:
{"limit":50,"offset":0,"totalNumberOfItems":10,"items":[{"uuid":"6fee41b2-eb68-4b06-875e-db0989a9dfae","title":"Roadtrip","numberOfTracks":297,"numberOfVideos":0,"creator":{"id":26690752},"description":"","duration":70722,"lastUpdated":"2019-01-15T12:01:53.016+0000","created":"2018-03-20T17:26:55.935+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/6fee41b2-eb68-4b06-875e-db0989a9dfae","image":"754ed920-794c-4381-b97b-90b9ccb1a47f","popularity":0,"squareImage":"2cc6a408-323a-43f0-88a2-5f9d2403abde"},{"uuid":"5524445d-ea91-4917-8ff0-4ef115b8dcab","title":"Bryllupsmiddag","numberOfTracks":64,"numberOfVideos":0,"creator":{"id":26690752},"description":"A playlist converted by Soundiiz from another music platform ! http://soundiiz.com","duration":14718,"lastUpdated":"2019-01-10T10:14:07.303+0000","created":"2018-03-19T18:57:43.114+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/5524445d-ea91-4917-8ff0-4ef115b8dcab","image":"74b3921d-c25f-4f55-aa06-21573bd72212","popularity":0,"squareImage":"0f7ab827-4bf4-4f93-80a4-e81963b3c108"},{"uuid":"180a4fec-e3a6-458d-b4ca-94cfd0562f1b","title":"Bryllupsfest","numberOfTracks":108,"numberOfVideos":0,"creator":{"id":26690752},"description":"A playlist converted by Soundiiz from another music platform ! http://soundiiz.com","duration":23385,"lastUpdated":"2019-01-10T10:12:43.567+0000","created":"2018-03-19T18:56:31.396+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/180a4fec-e3a6-458d-b4ca-94cfd0562f1b","image":"1c140396-816f-4bcb-9d76-2736c292f6ed","popularity":0,"squareImage":"34dd1c05-71d5-4699-8adb-5e766da94e85"},{"uuid":"dbbd98ab-94bf-4789-8177-33836a54a3d4","title":"Xmas","numberOfTracks":3,"numberOfVideos":0,"creator":{"id":26690752},"description":"","duration":644,"lastUpdated":"2018-12-18T11:46:07.386+0000","created":"2018-12-18T11:45:10.125+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/dbbd98ab-94bf-4789-8177-33836a54a3d4","image":"4aca444c-bd28-4b4f-adc6-68d2488ee73a","popularity":0,"squareImage":"4f79bca4-2359-4229-b4d7-3f72deeb1f60"},{"uuid":"2cd93700-244a-4939-8586-92ccf5e26031","title":"Travel","numberOfTracks":30,"numberOfVideos":0,"creator":{"id":26690752},"description":"A playlist converted by Soundiiz from another music platform ! http://soundiiz.com","duration":7985,"lastUpdated":"2018-11-14T13:29:04.411+0000","created":"2018-03-19T18:56:05.008+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/2cd93700-244a-4939-8586-92ccf5e26031","image":"c4369914-5a03-44a2-a76f-0d1212691ea6","popularity":0,"squareImage":"c872b6c4-9ab8-4804-b8fc-9f10ee026dee"},{"uuid":"6d681a3a-1488-4075-a5b2-078a7ff74598","title":"Lounge","numberOfTracks":33,"numberOfVideos":0,"creator":{"id":26690752},"description":"A playlist converted by Soundiiz from another music platform ! http://soundiiz.com","duration":7581,"lastUpdated":"2018-09-18T08:42:53.498+0000","created":"2018-03-19T19:08:18.952+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/6d681a3a-1488-4075-a5b2-078a7ff74598","image":"c6e903f1-f4e4-4989-a75e-e16c8ed5fcb7","popularity":0,"squareImage":null},{"uuid":"d95b6662-3b08-4f71-83bb-ff174ae8d76f","title":"Crazy Covers","numberOfTracks":8,"numberOfVideos":0,"creator":{"id":26690752},"description":"","duration":1607,"lastUpdated":"2018-09-17T11:01:55.430+0000","created":"2018-03-30T19:55:44.479+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/d95b6662-3b08-4f71-83bb-ff174ae8d76f","image":"ce727e5c-11fc-4586-9764-ae341a58e8ec","popularity":0,"squareImage":null},{"uuid":"f101d2f8-5e37-4cfb-b4ac-070f58bee1ff","title":"Late Night","numberOfTracks":12,"numberOfVideos":0,"creator":{"id":26690752},"description":"","duration":2904,"lastUpdated":"2018-09-03T13:49:24.087+0000","created":"2018-04-07T21:27:43.524+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/f101d2f8-5e37-4cfb-b4ac-070f58bee1ff","image":"4bec0b67-242e-4d83-8387-6d6b90fcd4d0","popularity":0,"squareImage":null},{"uuid":"b63aa5d7-df4d-4bab-b9b5-edb8ae870066","title":"Breakup Songs","numberOfTracks":11,"numberOfVideos":0,"creator":{"id":26690752},"description":"A playlist converted by Soundiiz from another music platform ! http://soundiiz.com","duration":2736,"lastUpdated":"2018-05-19T13:01:01.147+0000","created":"2018-03-19T19:06:41.316+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/b63aa5d7-df4d-4bab-b9b5-edb8ae870066","image":"b080a6c0-dcb6-448a-8670-6501e6d7b941","popularity":0,"squareImage":null},{"uuid":"017ae66a-1c08-43c1-b582-fb4ea23a5f9d","title":"Party","numberOfTracks":16,"numberOfVideos":0,"creator":{"id":26690752},"description":"","duration":3396,"lastUpdated":"2018-03-20T17:25:09.766+0000","created":"2018-03-19T19:08:53.332+0000","type":"USER","publicPlaylist":false,"url":"http://www.tidal.com/playlist/017ae66a-1c08-43c1-b582-fb4ea23a5f9d","image":"88e7292e-c6f4-4d7a-869a-416b33405e3b","popularity":0,"squareImage":null}]}
from which I would suggest returning the "items" array, since this matches the format returned from getFavoritePlaylists.
Is this something you can add?
For few weeks I cant login to Tidal using this API. But I found the problem. The problem is webToken in index.js. I don't know what is wrong but when I fount this token (kgsOOmYk3zShYrNP) on the internet and replace the original token everything starts working again.
I thing we need new token in your GREAT API.
https://www.npmjs.com/advisories/880
Can be fixed by updating axios to 18.1
It looks like they've changed the API. It now requires a "x-tidal-token" header.
The funny thing is, i think that the header is static? At least for public API's.
For me it is gsFXkJqGrUNoYMQPZe4k3WKwijnrp8iGSwn3bApe
. Can someone confirm this?
path:
https://api.tidal.com/v1/search/tracks?query=Don't Forget About Me&limit=1&countryCode=US
response
data:
{ status: 400,
subStatus: 1002,
userMessage: 'countryCode parameter missing' }
As far as I understand facebook login isn't presented in your API wrapper?
Hi,
Do you have any plans for adding write methods as well? API for playlist and collection management would be very useful.
edit: never mind this was a dumb mistake.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.