Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Hey all. Anyone have success using Powershell to interact with the Spotify API? I’ve been able to capture to auth code but I’m getting a “something went wrong” back when trying to use Invoke-Restmethod to the /token endpoint. I’ve got the base64 client id/secret and the auth code but I can’t tell why it’s failing and there is no context from the response.
Operating System
Windows 10
Thanks. I’ll give that a shot.
Hi,
Could you please share the below concept for a newbie like myself:
How to properly achieve the base64 encoding of the
"client_id:client_secret"
that's needed in the step "1. Have your application request authorization"
from the Client Credentials Flow ?
I've done it using the certUtil tool from Windows command-line.
It reads the <client_id:client_secret> string from input.txt and writes the encoding into output.txt.
certUtil -encode input.txt output.txt
The encoded string contains a newline character in the output.txt,
which doesn't help the cURL request, if I remove it ...
I get an Invalid Client error
(but I'm sure it has to do with the newline from the encoded output string).
Spotify's cURL command is:
curl -X "POST"
-H "Authorization: Basic <base64 encoded client_id:client_secret>"
-d grant_type=client_credentials
https://accounts.spotify.com/api/token
Much appreciated.
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…