Client Side Application on top of Spotify's API


Client Side Application on top of Spotify's API


I am building a CLI on top of this Node.js API client:


From what I understand, I need 2 kinds of authetnications. One is for the app itself (described here), and one is user authentication (described in the repo, done with only clientId).


My question is - a user is installing the CLI, all is well - how should the CLI get the clientId from the user? That is still a bit unclear to me, must be missing something.

1 Reply

Re: Client Side Application on top of Spotify's API

Rock Star 16
Rock Star 16

Hey @SockworkOrange, thanks for posting on the Spotify Community!

Great question! You need to create an app on: after that, users can authenticate for your app through the Client ID. There's more information about authorization flows here:


After the authentication the Accounts service will redirect back to the URL you've given. For example: the CLI can ask the user to authenticate using the authorization link and you can redirect to a webpage that simply gives the token that it'll get from Spotify. The user can copy and paste this in their Terminal to continue.


Let me know if you have any questions!


Have a great day,


HuboRock Star 16
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.