Autoretto.
← All posts
How it works · July 29, 2026 · 3 min read · Autoretto Daily

Why you never touch a YouTube API key on Autoretto

When you connect your YouTube channel to Autoretto, we never ask for an API key. That might sound unusual if you have built any YouTube integrations before. Usually you need to create a project in Google Cloud, enable APIs, and copy a long string of letters and numbers. Then you have to store it somewhere safe. If it leaks, someone could upload videos without your permission. We skip all of that. The whole process is simpler and more secure.

We use Google OAuth. It is the same system used by many apps when they ask 'Sign in with Google.' The first time you connect a channel, you see a consent screen. It tells you exactly what permissions Autoretto needs. In our case, we ask to manage your YouTube channel. You click allow, and that is it. You never see a client ID or secret. You never copy a token. Google handles the handshake between your browser and our server.

Once you approve, Google sends us an authorization code. Our server exchanges that code for two tokens. One is an access token. It works for about an hour. The other is a refresh token. It lasts much longer, but we do not store it as plain text. We encrypt it before saving it to our database. We use a key that only our server knows. Even if someone accessed the database, they could not read the token. This is how we keep your channel secure.

When your video is ready to upload, our server needs a fresh access token. It does not ask you to log in again. Instead, it pulls the encrypted refresh token from the database, decrypts it, and sends it to Google. Google sends back a new access token. This whole exchange takes less than a second. The new access token is used to upload the video, and then it expires. The next upload will mint another one. This keeps the window of exposure extremely small.

You might worry about the refresh token expiring. Google can revoke a refresh token if the user changes their password or if the token is not used for a long time. But Autoretto uses the token at least once per scheduled upload. Regular use keeps it alive. If for some reason the token does expire, we notify you and ask you to reconnect the channel through OAuth again. It is rare, but we handle it gracefully.

Compare this to managing API keys yourself. You would have to create a Google Cloud project, enable the YouTube Data API v3, and generate an API key. You would need to store that key securely in environment variables. You would have to rotate it periodically. If you wanted to add another channel, you would go through the whole process again. With Autoretto, you just click connect. We handle the rest. The refresh token is our long-lived credential, and it is always encrypted.

There is one more layer of safety. The access token we mint is scoped exactly to your channel. It cannot be used to access any other Google service. And because we mint it on our server at the moment of upload, it never touches your browser or any client-side code. Your channel is never exposed to potential attacks from other parts of the application. Every upload is a fresh, short-lived key.

That is it. No API keys, no dashboards full of credentials, no fear of leaks. Just one click to connect, and then Autoretto publishes your music videos automatically. The OAuth flow is standard, the encryption is strong, and the token lifecycle is managed entirely on the server. You can focus on making music while we handle the YouTube authorization.