VxMusic

Back to Log
Features6 min read

How Sync Works: The Magic Behind the Bridge

March 10, 2025

One of VxMusic's most loved features is the ability to import your entire YouTube Music library in seconds. But how do we do it without storing your password?

OAuth 2.0 & Scoped Permissions

We use Google's official OAuth 2.0 API. When you "Sign In with Google," you are granting VxMusic a temporary "access token" with a very specific scope: youtube.readonly. We cannot update your channel, post comments, or delete videos. We can only read your playlists.

The Indexing Engine

Once we have the token, our indexing engine fetches your playlist metadata (Song Title, Artist, Duration). We don't download the audio files yet. We match this metadata against our own high-quality database to find the best available audio source.

Real-time vs Cached

For your "Liked Songs," we cache the index locally on your device using Room Database (Android) or IndexedDB (Web). This means your library loads instantly, even offline. We only hit the API to check for *new* songs, saving you data and battery.