Posts

Post not yet marked as solved
23 Replies
Hi, everyone. I am generating the jwt on the fly, but when I make a frontend request for songs with the Authorization as Bearer Token, it returns a 401. Is there a special way to make the frontend request? This is how I am making the request in a react frontend, I just want to see the list of albums. const getAlbums = async () => { let albums = await axios.get("https://api.music.apple.com/v1/catalog/us/albums", { headers: { headers: { Authorization: `Bearer ${token}`, Accept: "application/json", "Content-Type": "application/json", }, }, }) .then((res) => console.log(res.data)); console.log(albums); }