Authentication Guide: Discogs API
VinylKit requires access to the Discogs API to fetch metadata and images. You can authenticate in two ways: using a Personal Access Token (simplest) or via OAuth 1.0a (required for full identity features).
Option 1: Personal Access Token (Recommended)
This is the fastest way to get started. It doesn't require a browser-based login flow.
- Log in to your Discogs Settings.
- Click "Generate new personal access token".
- Copy the token.
- Configure VinylKit to use it:
# Bash / PowerShell
vinylkit config set discogs_token <YOUR_TOKEN>
Option 2: OAuth 1.0a (Browser Login)
If you prefer to use the interactive login flow, you must first create a "Discogs Application" to get a Consumer Key and Secret.
1. Create a Discogs Application
- Go to the Discogs Developer Portal.
- Click "Create an Application".
- Fill in the details (e.g., Name: "MyVinylKit", Description: "Local tagging tool").
- Once created, you will see a Consumer Key and Consumer Secret.
2. Configure VinylKit with your App Credentials
Since VinylKit is a local tool, you need to provide these credentials once:
# Bash / PowerShell
vinylkit config set consumer_key <YOUR_KEY>
vinylkit config set consumer_secret <YOUR_SECRET>
3. Run the Login Command
Now you can perform the interactive login:
# Bash / PowerShell
vinylkit auth login
- VinylKit will provide a URL.
- Open the URL in your browser and click "Authorize".
- Discogs will display a Verifier Code.
- Copy that code back into your terminal when prompted.
Understanding Auth Modes
VinylKit can store multiple types of credentials at once. You can control which one is used via the auth_mode setting.
How it chooses (Auto-Priority)
By default, auth_mode is set to auto. VinylKit will look for credentials and use the most powerful one it finds in this order:
- Full OAuth 1.0a: If you have completed the
auth loginflow. - Personal Access Token: If you have manually set a
discogs_token. - Key & Secret: If you have only set
consumer_keyandconsumer_secret.
Manually Switching Modes
You can force VinylKit to use a specific method even if others are configured:
# Bash / PowerShell
# Force use of your Personal Access Token
vinylkit config set auth_mode token
# Force use of Full OAuth
vinylkit config set auth_mode oauth
# Switch back to automatic selection
vinylkit config set auth_mode auto
| Mode | Images? | Identity? | Best For... |
|---|---|---|---|
token |
Yes | Yes | Fast setup, personal use |
oauth |
Yes | Yes | 3rd-party app feel, full account access |
key_secret |
Yes | No | Quick testing without account identity |
none |
No | No | Public data only (Low rate limit) |
Migrating Credentials Between Machines
If you need to manually set up OAuth credentials from another machine, you will need the discogs_secret (OAuth token secret) in addition to discogs_token:
# Bash / PowerShell
vinylkit config set discogs_token <YOUR_TOKEN>
vinylkit config set discogs_secret <YOUR_SECRET>
vinylkit config set consumer_key <YOUR_KEY>
vinylkit config set consumer_secret <YOUR_SECRET>
vinylkit config set auth_mode oauth
Verifying Authentication
To check which mode is active and if your credentials are valid:
# Bash / PowerShell
vinylkit config show
vinylkit auth identity
See Also
- Configuration Guide — Full list of all settings including auth-related keys.
- User Guide — Command reference and workflows.