← Back to Home View Full API Reference →

MusicMate ChatBot Integration Guide

Getting Started

  1. Request an API key from our admin
  2. Choose your integration method
  3. Test the integration

Integration Methods

Method 1: Script Injection (Recommended)

The easiest way to add MusicMate to your website.

Requirements

Steps

  1. Add the API key script
  2. Add the widget loader
  3. That's it! The widget will appear automatically
<script> window.MUSICMATE_API_KEY = 'your_api_key_here'; </script> <script src="https://spotify-bot.azurewebsites.net/static/js/widget-loader.js"></script>

Method 2: API Only

If you want to build your own UI, just use our API endpoint:

Setup Steps

  1. Get your API key from admin
  2. Send us your domain to add to CORS
  3. Use this endpoint:
fetch('https://spotify-bot.azurewebsites.net/api/v1/chat', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'your_api_key_here' }, body: JSON.stringify({ user_id: 'any_user_id', message: 'your message', mode: 'support' // or 'ai' }) });

Testing

For development and testing purposes, you can use this API key:

mk_1WsqTJZes3mZpiFHHjFyqvWYDpsMu9fou5crpbkarQ4

⚠️ This key will only work on localhost:3000

That's it! The response will contain the chatbot's reply.

Features

Support Mode

  • Decision tree-based responses
  • Sentiment analysis
  • Automated support tickets
  • Conversation history

AI Mode

  • Music recommendations
  • Website context awareness
  • Natural conversations
  • Musical personality

Error Handling

Error Code Description
401 Missing API key
403 Invalid API key
500 Server error

FAQ

How do I get an API key?

Contact our admin team to request an API key for your website.

Can I use both modes?

Yes! The widget includes a toggle to switch between Support and AI modes.

Is there a rate limit?

Currently no rate limits are implemented.

← Back to Home View Full API Reference →