Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

[Newbie question] Recommended tool for the base64 encoding of <client_id:client_secret> ?

[Newbie question] Recommended tool for the base64 encoding of <client_id:client_secret> ?


My Question or Issue

I tried the Client Credentials Flow
(which is the 4th authorization flow in the Authorization Guide),
Step 1: Have your application request authorization


and I got an error.

 

Step 1 is basically this cURL command:

 

curl -X "POST"
-H "Authorization: Basic <base64 encoded client_id:client_secret>"
-d grant_type=client_credentials
https://accounts.spotify.com/api/token


I'm not confident with the base64 encoding of the "client_id:client_secret" couple there.
I've used Windows "certUtil -encode" command-line.

 

Is there a recommended tool for this base64 encoding ?

 

Plan

Free


Country

Romania

Device

Dell laptop

Operating System

Windows 10

 

Reply
2 Replies

Just use https://www.base64encode.org/ or a similar tool.

On Windows you don't need any program to do this, you can use the CMD certutil command, although Microsoft does not recommend using it in a live environment: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil

 

I would rather recommend the PowerShell solution, where there are ConvertTo-Base64 and ConvertFrom-Base64 cmdlets. Here is a concrete description if you would implement it: https://b64encode.com/blog/base64-in-powershell/

Suggested posts