-
-
Notifications
You must be signed in to change notification settings - Fork 7
auth token
- Generate a DeviceCode
- Poll the auth_server every 2 seconds to check if the DeviceCode is authorized.
- If the DeviceCode is authorized within 300s / 5m a access_token and a refresh_token will be generated. The access_token lasts 604800s / 7 Days.
POST
https://auth.tidal.com/v1/oauth2/token
client_id: {client_id}
device_code: {device_code}
grant_type: urn:ietf:params:oauth:grant-type:device_code
scope: r_usr+w_usr+w_sub
{client_id} : {client_secret}
{
"status": 400,
"error": "authorization_pending",
"sub_status": 1002,
"error_description": "Device Authorization [DeviceAuthorization(id=xxxxxxx, userCode={user_code}, deviceCode={device_code}, clientToken={client_id}, userId=0, scopes=r_usr+w_usr+w_sub, created=Fri Oct 13 19:46:12 UTC 2020, validUntil=Fri Oct 13 19:51:52 UTC 2020, authorized=null, used=null, lastCheck=Fri Oct 13 19:48:35 UTC 2020)] is not authorized yet"
}
{
"access_token": {access_token},
"refresh_token": {refresh_token},
"token_type": "Bearer",
"expires_in": 604800,
"user": {
"userId": 012345678,
"email": null,
"countryCode": "DE",
"fullName": null,
"firstName": null,
"lastName": null,
"nickname": null,
"username": "test@example.com",
"address": null,
"city": null,
"postalcode": null,
"usState": null,
"phoneNumber": null,
"birthday": null,
"gender": null,
"imageId": null,
"channelId": 0123,
"parentId": 0,
"acceptedEULA": true,
"created": 0000000000000,
"updated": 0000000000000,
"facebookUid": 0,
"appleUid": null,
"newUser": false
}
}
- If your AccessToken has expired use the RefreshToken to get a new AccessToken
POST
https://auth.tidal.com/v1/oauth2/token
client_id: {client_id}
refresh_token: {refresh_token}
grant_type: refresh_token
scope: r_usr+w_usr+w_sub
{client_id} : {client_secret}
{
"access_token": {access_token},
"token_type": "Bearer",
"expires_in": 604800,
"user": {
"userId": 012345678,
"email": null,
"countryCode": "DE",
"fullName": null,
"firstName": null,
"lastName": null,
"nickname": null,
"username": "test@example.com",
"address": null,
"city": null,
"postalcode": null,
"usState": null,
"phoneNumber": null,
"birthday": null,
"gender": null,
"imageId": null,
"channelId": 0123,
"parentId": 0,
"acceptedEULA": true,
"created": 0000000000000,
"updated": 0000000000000,
"facebookUid": 0,
"appleUid": null,
"newUser": false
}
}
- Use the Response Code from the web-based authorization flow
POST
https://auth.tidal.com/v1/oauth2/token
client_id: {client_id}
code: {code}
redirect_uri: {redirect_uri}
code_verifier: {code_verifier}
client_unique_key: {client_unique_key}
(optional)
grant_type: authorization_code
scope: r_usr+w_usr+w_sub
```{client_id} : {client_secret}`
{
"access_token": {access_token},
"refresh_token": {refresh_token},
"token_type": "Bearer",
"expires_in": 604800,
"user": {
"userId": 012345678,
"email": null,
"countryCode": "DE",
"fullName": null,
"firstName": null,
"lastName": null,
"nickname": null,
"username": "test@example.com",
"address": null,
"city": null,
"postalcode": null,
"usState": null,
"phoneNumber": null,
"birthday": null,
"gender": null,
"imageId": null,
"channelId": 0123,
"parentId": 0,
"acceptedEULA": true,
"created": 0000000000000,
"updated": 0000000000000,
"facebookUid": 0,
"appleUid": null,
"newUser": false
}
}
POST
https://auth.tidal.com/v1/oauth2/token
client_id: {client_id}
user_auth_token: {user_auth_token}
client_version: {client_version}
(optional)
client_unique_key: {client_unique_key}
(optional)
grant_type: user_auth_token
scope: r_usr+w_usr+w_sub
{client_id} : {client_secret}
- Get Artist
- Get Artist Bio
- Get Artist Links
- Get Artist Mix
- Get Artist TopTracks
- Get Artist Videos
- Get Artist Albums
- Get Playlist
- Get Playlist Items
- Get Playlist Recommendations Items
- Add Playlist Item
- Move Playlist Item
- Replace Playlist Item
- Rename Playlist
- Delete Playlist
- Delete Playlist Item
- Get Track
- Get Track Contributors
- Get Track Mix
- Get Track StreamUrl (not recommended)
- Get Track PlaybackInfoPostPaywall
- Get Track PlaybackInfoPrePaywall
- Get Video
- Get Video Contributors
- Get Video StreamUrl (not recommended)
- Get Video PlaybackInfoPostPaywall
- Get Video PlaybackInfoPrePaywall
- Get User Favorite Ids
- Get User Favorite Albums
- Get User Favorite Artists
- Get User Playlists & Favorite Playlists
- Get User Favorite Tracks
- Get User Favorite Videos
- Get User Favorite Playlists
- Get User Favorite Mixes
- Get User Offline Albums
- Get User Offline Playlists
- Delete User Offline All
- Delete User Offline Album
- Delete User Offline Playlist
- Delete User Favorite Album
- Delete User Favorite Artists
- Delete User Favorite Playlists
- Delete User Favorite Tracks
- Delete User Favorite Videos
- Delete User Favorite Mixes
- Add User Favorite Album
- Add User Favorite Artists
- Add User Favorite Playlists
- Add User Favorite Tracks
- Add User Favorite Videos
- Add User Favorite Mixes
- Add User Offline Album
- Add User Offline Playlist
- Update User Image
- Post oAuth Token
- Post oAuth Device Authorization
- Login Username & Password (Deprecated)
- Get User Auth Token (SessionId Migration)
- Log Out