- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I started making my own music display app. I chose to use the Spotify API, I don't have a premium subscription (can the problem arise because of this?) . I registered the app, got a secret client and a client ID. Here's my code.
async getData(){
let result = await fetch('https://accounts.spotify.com/api/token', {
method: 'POST',
headers: {
'Content-Type' : 'application/x-www-form-urlencoded',
'Authorization': 'Basic' + btoa(this.client_id + ':' + this.client_secret)
},
body: 'grant_type=client_cred
Why do I get an error 400, error: 'invalid_client' response from the server
async getData(){
let result = await fetch('https://accounts.spotify.com/api/token', {
method: 'POST',
headers: {
'Content-Type' : 'application/x-www-form-urlencoded',
'Authorization': 'Basic' + btoa(this.client_id + ':' + this.client_secret)
},
body: 'grant_type=client_cred
Why do I get an error 400, error: 'invalid_client' response from the server
Solved! Go to Solution.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page