https://github.com/amarnathcjd/spotifybiobot
A bot that syncs your Telegram bio with your current Spotify track in real-time.
https://github.com/amarnathcjd/spotifybiobot
bio spotify spotify-api spotify-web-api telegram userbot
Last synced: 7 months ago
JSON representation
A bot that syncs your Telegram bio with your current Spotify track in real-time.
- Host: GitHub
- URL: https://github.com/amarnathcjd/spotifybiobot
- Owner: AmarnathCJD
- Created: 2024-05-19T18:12:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-19T18:19:09.000Z (over 1 year ago)
- Last Synced: 2025-03-10T15:52:44.774Z (7 months ago)
- Topics: bio, spotify, spotify-api, spotify-web-api, telegram, userbot
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## # Spotify Bio Bot for Telegram 🎵🤖
Automatically update your Telegram bio to reflect the song you're currently playing on Spotify. This bot synchronizes your Spotify activity with your Telegram bio, ensuring your friends always know what you're vibing to!
## Features ✨
- **Real-time Bio Updates**: Syncs your Telegram bio with your current Spotify track.
- **Customizable Default Bio**: Reverts to a default bio when not listening to music.
- **Easy Setup**: Simple environment variable configuration.
- **Secure Authentication**: Uses OAuth to securely connect to your Spotify account.
- **Lightweight**: Powered by the Aiohttp and Telethon libraries.
- **Refresh Token Support**: Automatically refreshes your Spotify access token every hour.## Getting Started 🚀
### Prerequisites 📋
- Python 3.9 or higher
- A **[Spotify Developer Account](https://developer.spotify.com/dashboard/applications)**### Installation 🛠️
1. **Clone the repository**:
```bash
git clone https://github.com/AmarnathCJD/spotifybiobot.git
cd spotifybiobot
```2. **Install the dependencies**:
```bash
pip install -r requirements.txt
```### Configuration ⚙️
1. **Set up your environment variables**:
Create a `.env` file in the root of your project and fill it with the following:```dotenv
SPOTIFY_CLIENT_ID=your-spotify-client-id
SPOTIFY_CLIENT_SECRET=your-spotify-client-secret
SPOTIFY_REFRESH_TOKEN=your-spotify-refresh-token
STRING_SESSION=your-string-session
API_ID=tg-api-id
API_HASH=tg-api-hash
DEFAULT_BIO=~
```2. **Obtain Spotify tokens**:
- Go to the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/applications) and create a new app.
- Set `http://localhost:3000` as the Redirect URI in the app settings.
- Copy the `Client ID` and `Client Secret` to your `.env` file.
- Use the `auth_token.py` script to generate your refresh token:
```bash
python auth_token.py
```
- Copy the refresh token to your `.env` file.### Running the Bot ▶️
Start the bot by running:
```bash
python main.py
```## Contributing 🤝
Contributions are welcome! Feel free to open an issue or submit a pull request if you have any improvements to suggest.
## License 📝
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.