-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests.txt
More file actions
110 lines (79 loc) · 4.98 KB
/
requests.txt
File metadata and controls
110 lines (79 loc) · 4.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
User Authorization URL bei der man scopes und Zugriffe akzeptieren muss:
https://accounts.spotify.com/authorize?client_id=6b865352bef549c088ff333ba60b5a0f&response_type=code&redirect_uri=https%3A%2F%2Fgithub.com&scope=playlist-read-private%20playlist-modify-private%20playlist-modify-public&show_dialog=true
s3 url: https://spm-package-bucket.s3.eu-central-1.amazonaws.com/my-first-lambda-package.zip
refresh_token: AQDF4Jai9VF-m7BS1i8iSIvJ7DHz89AFZYfWpSMRJ8CrfHc8qk5Sm21_3vqNfKuGixJn_exJt1N8MRbsL8e5-qKMF8SrFSlNS_f4j2BiI18yHOO9Xb-mR33h31Lz5DxUh5I
Mit Authorization Code aus Browser URL access und refresh token erhalten:
curl --request POST \
--header "Authorization: Basic NmI4NjUzNTJiZWY1NDljMDg4ZmYzMzNiYTYwYjVhMGY6NmFjYWVjNjIxNDNkNDQxODk2OWY3NzhmYTcwODRiZTM=" \
--data grant_type=authorization_code \
--data code=AQDmXy1rI0-AdkYwWD14pGYD1BcRqOcGYfhSiCbYmDmjPJlTXa_ICPMrkXojIqOT2IRab-OzHiHSX7R3AZmFh42ELyKOdsPkvqTnZ6-Zld8j37neSkTY3pHxVwrNstjvSaRElXH5PsNQmJWOWoqL_KO8luv68gYo5dBZuipJzOzJ-9CS_Sz5bUFbnzk4vqLGN5-3MuQtZ2a9a4nB4qfP7eawUMhcMpcHQxnGvicuXGZIHMx5jqeFKVbUjxP8geeJYdscsK_CPmDSPRtoryNGv0g \
--data redirect_uri=https%3A%2F%2Fgithub.com https://accounts.spotify.com/api/token
Access token mit refresh token erneuern:
curl --request POST \
--url https://accounts.spotify.com/api/token \
--header "Authorization: Basic NmI4NjUzNTJiZWY1NDljMDg4ZmYzMzNiYTYwYjVhMGY6NmFjYWVjNjIxNDNkNDQxODk2OWY3NzhmYTcwODRiZTM=" \
--data grant_type=refresh_token \
--data refresh_token=AQBKQoF8LPYeQDALQfCa4VlzHcc04GRCtV6ItLk7EQEZNXNbKSRaeebmyW7WoxltPMBB5pJVFePxFtnousEq2QFtyD2QcEPQSZfcrTDWpVeVUzr5AYCu1DI4yP-jeGcXyZg
Profilinfos, wie z.B. Usename:
curl --request GET \
--url https://api.spotify.com/v1/me \
--header 'Authorization: Bearer BQCdOsQj28zehPbCgnhrTf7qwQMKQh7bltWT-cg0cIvLhEhERTvGY58o874pVhuT6Kr2pxWJTUsmv5-G1-Xx4rA03tfhO9AFdr1DjEhuI0xKk4t6ERUvZmDNWJr5snoKCqTDgyMndSqbxW3jTRznoMgCLptxRk97gdsY-JZ_i-rssWEtGWv4Hr7a8md1' \
--header 'Content-Type: application/json'
Alle Playlists von user ausgeben:
curl --request GET \
--url https://api.spotify.com/v1/users/kasimir3/playlists \
--header 'Authorization: Bearer BQCdOsQj28zehPbCgnhrTf7qwQMKQh7bltWT-cg0cIvLhEhERTvGY58o874pVhuT6Kr2pxWJTUsmv5-G1-Xx4rA03tfhO9AFdr1DjEhuI0xKk4t6ERUvZmDNWJr5snoKCqTDgyMndSqbxW3jTRznoMgCLptxRk97gdsY-JZ_i-rssWEtGWv4Hr7a8md1' \
--header 'Content-Type: application/json'
Get Playlist Items:
curl --request GET \
--url 'https://api.spotify.com/v1/playlists/6NYUUALff1pcZRJHaLpvRA/tracks?offset=5&limit=5&fields=items(track(name),%20added_at),%20next' \
--header 'Authorization: Bearer BQCahG0wmBOP5V8sBoOVlfScABZkbECJJkU_0M6KLloBG9Bxv6xrJskLrtDVI86ZGjB-fTaGvkdr-WuWy7v3UjKGxw2Ae0isEbumPpoQmYIXAe9M8cYmyxqkjZwTP9qOeEZJ7r5Dy9Z5Pw7m8lT60xiAAt57qMc-hv2B2My6immsicksgoVG8u8E3Lpa' \
--header 'Content-Type: application/json'
Songs aus Testplaylist entfernen:
curl --request DELETE \
--url https://api.spotify.com/v1/playlists/60QjB7v7V8If58q661ZzOj/tracks \
--header 'Authorization: Bearer BQCllg5OKBz1lufxvIBoje0FfFAvAelb4QI10PxmfFBP7kuTXlq2vBqaosab5tJSm3DGhO-uRBs2j5H9XQ7q1PNKhHFX2b19VRVC1ATDjed9hmJWJQkKDEtgFj_ozpnONxxQgMuyGawFuNflqOviiTxPp9xUEB8SgMe3FQT8koyx4e0Ewc0TTCXNffCo' \
--header 'Content-Type: application/json' \
--data "{"tracks": [{"uri": "spotify:track:3KPhaCvEPAKmwgYd8LARFe"}]}"
Ist Song in User's Saved Tracks?:
curl --request GET \
--url 'https://api.spotify.com/v1/me/tracks/contains?ids=3KPhaCvEPAKmwgYd8LARFe,4tfwHz3WpIbjKIsuuuTiEy' \
--header 'Authorization: Bearer BQCtEIkCcPZbysNyc7HXvSeL9wqMBqH6BUlc6voeX0QjVZEovLzCfzKNzTJ2t5uh93tTqb2PToCPcuTm7-Q8oxxTalUaaKyQvdSxWwo63cAFxwnPMRA6qQf4e3Gu53jz4HmcSa7pwfkyDf--XkMGaPdFgBbRzP1o2FtBE0GltzBotiwlvSh-xM3UE6ObWL_5S9mI7skHQOrNxuXxi7LBfCyVq0s2v9lFWGxi1BbgMi7PAZcH9KCCHUY_LEU4JYC0dg' \
--header 'Content-Type: application/json'
meine drip drop playlist:
{
"collaborative" : false,
"description" : "",
"external_urls" : {
"spotify" : "https://open.spotify.com/playlist/6NYUUALff1pcZRJHaLpvRA"
},
"href" : "https://api.spotify.com/v1/playlists/6NYUUALff1pcZRJHaLpvRA",
"id" : "6NYUUALff1pcZRJHaLpvRA",
"images" : [ {
"height" : null,
"url" : "https://i.scdn.co/image/ab67706c0000bebb81c5358ec55fbbde1715bc28",
"width" : null
} ],
"name" : "drip drop",
"owner" : {
"display_name" : "liam",
"external_urls" : {
"spotify" : "https://open.spotify.com/user/kasimir3"
},
"href" : "https://api.spotify.com/v1/users/kasimir3",
"id" : "kasimir3",
"type" : "user",
"uri" : "spotify:user:kasimir3"
},
"primary_color" : null,
"public" : true,
"snapshot_id" : "MjQ3OSxiODkxOTgxZjE3MTkxNGQ2YmE1MDM3Y2Y3NmY5ZjZjN2MwZjg3MDhk",
"tracks" : {
"href" : "https://api.spotify.com/v1/playlists/6NYUUALff1pcZRJHaLpvRA/tracks",
"total" : 205
},
"type" : "playlist",
"uri" : "spotify:playlist:6NYUUALff1pcZRJHaLpvRA"
}
rt:
AQAdT2SYh8NFMaiCKJLvBiE1IyWSZ0u-NVWLr4lQhmRhsvM913BdUEFSirOKOY3ZVHReeiQmHL7hlBNWF2fQ8snbK3U7JfVupsjzVShTx262Sx1sR_GxRi7Jl5wHKV8Ql6g