https://github.com/ibebbs/spotifyauthenticator
A .Net Core console application for retrieving access and refresh tokens from Spotify.
https://github.com/ibebbs/spotifyauthenticator
Last synced: about 1 year ago
JSON representation
A .Net Core console application for retrieving access and refresh tokens from Spotify.
- Host: GitHub
- URL: https://github.com/ibebbs/spotifyauthenticator
- Owner: ibebbs
- Created: 2018-04-18T16:26:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-18T16:26:56.000Z (about 8 years ago)
- Last Synced: 2025-05-25T08:41:38.113Z (about 1 year ago)
- Language: C#
- Size: 71.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Spotify Authenticator
A .Net Core console application for retrieving access and refresh tokens from Spotify.
# Background
In order to any vaguely interesting endpoints in [Spotify's Web API](https://developer.spotify.com/web-api/) you need two things:
1. A client application
2. Authorization from the user for the client application to access their resources
## Creating a client application
TBC
## Authorizing the use of user resources
That is where this utility comes in. It allows you to easily retreive a 'refreshable' access token from Spotify.
# Usage
## Authorization
The `authorize` command is used to initiate a ['Authorization Code' ](https://beta.developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow) flow. This command requires both your client id and client secret and displays a prompt to the user (using the supplied browser) authorizing the client app's access the users resources.
`
dotnet SpotifyAuthenticator.dll -c -k -s -o -b
`
e.g.
`
dotnet SpotifyAuthenticator.dll authorize -c ############## -k ####################### -s UserReadPrivate -s UserReadPlaybackState -s UserModifyPlaybackState -o "c:\Temp\Token.json" -b "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
`
## Refresh Token
TBC
# Attribution
This project uses [Jonas Dellinger's](https://github.com/JohnnyCrazy) awesome [SpotifyAPI-NET](https://github.com/JohnnyCrazy/SpotifyAPI-NET) project. A custom build of this library was made by yours truely to support .NET Core an is currently awaiting [PR approval](https://github.com/JohnnyCrazy/SpotifyAPI-NET/pull/237).