/SpotifyTelegramBot

Telegram Bot for exploring Spotify

Primary LanguageF#

Spotify Telegram Bot

Telegram Bot to explore Spotify.

Getting Started

Prerequisites

Installing

Spotify:

  1. Go to Spotify Developer Portal
  2. Register new application
  3. Copy Client Id and Client Secret
  4. Add callback url of /api/spotify/callback function to allowed callback urls

Telegram:

  1. Contact to @BotFather in Telegram
  2. Create new bot
  3. Copy bot token

Project:

  1. Clone project
  2. Publish to Azure Functions or run locally
  3. Update Azure Functions app configuration according to table below
Parameter Required? Description
Database__ConnectionString true Connection string to PostgreSQL DB to store users and their spotify refresh tokens
Spotify__CallbackUrl true Callback url of function to handle Spotify callback. Should be url of api/spotify/callback function
Spotify__ClientId true Spotify app Client Id
Spotify__ClientSecret true Spotify app ClientSecret
Telegram__BotUrl true Url of your telegram bot. E.g. https://t.me/sptfyqbot
Telegram__Token true Telegram bot token

Usage

You can try this bot in Telegram

Built With

  • Telegram.Bot - .NET Client for Telegram Bot API
  • SpotifyAPI-NET - An API for the Spotify-Client and the Spotify Web API, written in C#/.NET
  • Azure Functions - More than just event-driven serverless compute

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

test change qwe