A comprehensive tool for automatically managing Twitch channel point redemptions. This tool monitors your Twitch channel for new redemptions, logs them to a Google Sheet, and automatically marks them as fulfilled on Twitch.
- π― Real-time Monitoring: Continuously monitors for new channel point redemptions
- π Google Sheets Integration: Automatically logs redemption data to Google Sheets
- β Auto-fulfillment: Marks redemptions as fulfilled on Twitch after logging
- π₯οΈ GUI & CLI: Both graphical and command-line interfaces available
- π Reliable Processing: Handles API rate limits and connection issues gracefully
- π Comprehensive Logging: Detailed logs for debugging and monitoring
You'll need to create a Twitch application and obtain:
- Client ID: From your Twitch Developer Console
- Access Token: OAuth token with
channel:manage:redemptionsscope
- Go to Twitch Developer Console
- Create a new application or use an existing one
- Note your Client ID
- For the Access Token, you can use tools like:
- Twitch Token Generator (easiest) Quick Token Link
- Manual OAuth flow (more secure)
Required Scopes: channel:manage:redemptions and channel:read:redemptions
You'll need a Google Cloud project with Sheets API enabled:
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable the Google Sheets API
- Create credentials (Service Account recommended)
- Download the credentials JSON file
- In Google Cloud Console, go to "Credentials"
- Create a new Service Account
- Download the JSON key file
- Share your Google Sheet with the service account email
- Save the JSON file as
credentials.jsonin the project directory
- Create a new Google Sheet
- Copy the Spreadsheet ID from the URL:
- URL:
https://docs.google.com/spreadsheets/d/{SPREADSHEET_ID}/edit
- URL:
- Share the sheet with your service account email (if using service account)
- The tool will automatically create headers in the sheet
-
Clone or download this project
-
Install Python dependencies:
pip install -r requirements.txt
-
Set up configuration:
cp config.example.ini config.ini
Edit
config.iniwith your credentials:[Twitch] access_token = your_twitch_access_token client_id = your_twitch_client_id broadcaster_id = [GoogleSheets] credentials_file = credentials.json spreadsheet_id = your_google_sheet_id sheet_name = Redemptions [App] log_level = INFO refresh_interval = 5 auto_reconnect = True watchdog_interval = 30
-
Place your Google credentials file as
credentials.json
Start the graphical interface:
python main_gui.pyThe GUI provides:
- Control Tab: Start/stop monitoring, test connections, view recent redemptions
- Configuration Tab: Edit settings without manually editing config files
- Logs Tab: View real-time application logs
python main_cli.py monitorpython main_cli.py testpython main_cli.py checkpython main_cli.py statuspython main_cli.py --config /path/to/config.ini monitor- Monitor: The tool continuously polls the Twitch API for unfulfilled redemptions
- Log: New redemptions are immediately written to your Google Sheet with details:
- Timestamp
- Redemption ID
- Reward title and cost
- User information
- User input (if any)
- Status
- Fulfill: After successful logging, the redemption is marked as fulfilled on Twitch
- Repeat: The process repeats based on your refresh interval
The tool creates a sheet with these columns:
- Timestamp: When the redemption was processed
- Redemption ID: Unique Twitch redemption identifier
- Reward Title: Name of the channel point reward
- Reward Cost: Cost in channel points
- User Name: Twitch username
- User Display Name: User's display name
- User Input: Any text input from the user
- Status: Processing status
- Redeemed At: Original redemption timestamp from Twitch
access_token: Your Twitch OAuth tokenclient_id: Your Twitch application client IDbroadcaster_id: Auto-detected broadcaster ID
credentials_file: Path to Google credentials JSON filespreadsheet_id: ID of your Google Sheetsheet_name: Name of the sheet tab (default: "Redemptions")
log_level: Logging verbosity (DEBUG, INFO, WARNING, ERROR)refresh_interval: How often to check for new redemptions (seconds)auto_reconnect: Automatically reconnect on connection losswatchdog_interval: Connection health check interval (seconds)
"Missing Twitch API credentials"
- Ensure your
access_tokenandclient_idare set in config.ini - Verify your access token has the required scopes
"Google Sheets connection failed"
- Check that
credentials.jsonexists and is valid - Ensure the Google Sheets API is enabled in your Google Cloud project
- Verify the spreadsheet is shared with your service account
"No redemptions found"
- Make sure you have channel point rewards set up
- Check that there are actually unfulfilled redemptions
- Verify your broadcaster ID is correct
Rate Limiting
- The tool handles Twitch rate limits automatically
- If you see rate limit warnings, consider increasing the refresh interval
Check the application logs for detailed error information:
- GUI: View logs in the "Logs" tab
- CLI: Check console output and
redemption_manager.logfile
- Keep your Twitch access token secure and private
- Regenerate tokens periodically
- Use service accounts for Google Sheets integration
- Don't commit credentials to version control
The project is structured as follows:
config_manager.py: Configuration handlingtwitch_api_client.py: Twitch API communicationgoogle_sheets_manager.py: Google Sheets integrationredemption_manager.py: Core business logicmain_gui.py: PyQt5 graphical interfacemain_cli.py: Command-line interface
This project is open source. Feel free to modify and distribute as needed.
For issues or questions:
- Check the logs for error details
- Verify your configuration is correct
- Test connections using the test feature
- Review the Twitch API documentation for any changes