BuildWithMatija
  1. Home
  2. Blog
  3. Tools
  4. rclone Google Drive Client ID: Create Your Own OAuth App

rclone Google Drive Client ID: Create Your Own OAuth App

Step-by-step guide to create a Google OAuth app and use its client_id/client_secret with rclone to avoid Drive API…

31st March 2026·Updated on:21st October 2026·MŽMatija Žiberna·
Tools
rclone Google Drive Client ID: Create Your Own OAuth App

📚 Get Practical Development Guides

Join developers getting comprehensive guides, code examples, optimization tips, and time-saving prompts to accelerate their development workflow.

No spam. Unsubscribe anytime.

Related Posts:

  • •OAuth for MCP Server: Complete Guide to Protecting Claude
  • •Payload Import Triggers: 4 Essential Ways to Queue Imports
  • •Google Drive OAuth for Payload CMS: Complete Guide
📄View markdown version
0

Frequently Asked Questions

Comments

About the author

Matija Žiberna

Matija Žiberna

Full-stack developer, co-founder

AboutResume

Self-taught full-stack developer sharing lessons from building software and startups.

I'm Matija Žiberna, a self-taught full-stack developer and co-founder passionate about building products, writing clean code, and figuring out how to turn ideas into businesses. I write about web development with Next.js, lessons from entrepreneurship, and the journey of learning by doing. My goal is to provide value through code—whether it's through tools, content, or real-world software.

You might be interested in

OAuth for MCP Server: Complete Guide to Protecting Claude
OAuth for MCP Server: Complete Guide to Protecting Claude

7th December 2025

Payload Import Triggers: 4 Essential Ways to Queue Imports
Payload Import Triggers: 4 Essential Ways to Queue Imports

2nd April 2026

Google Drive OAuth for Payload CMS: Complete Guide
Google Drive OAuth for Payload CMS: Complete Guide

13th March 2026

Contents

  • Google Drive `client_id` for rclone, headless server setup
  • Why this matters
  • What I had to create
  • Steps
  • Notes
  • Useful rclone command
  • Result
  • Keep the token from expiring after 7 days
  • What to do next
On this page:
  • Google Drive `client_id` for rclone, headless server setup
  • What to do next
Build with Matija logo

Build with Matija

Senior-led B2B websites, applications, content systems, and digital infrastructure. Business-first, full-stack, AI-assisted, no handoffs.

Services

  • B2B Website Development
  • CMS Architecture Review & Platform Blueprint
  • Next.js + Payload Advisory
  • AI Integration & Implementation

Resources

  • CMS Hub
  • B2B Website Strategy
  • E-commerce Hub
  • Blog
  • Case Studies
  • About Matija

Payload CMS

  • Payload CMS Developer
  • Payload CMS Migration
  • Payload CMS Demos
  • All Payload CMS Resources

Discuss your project

Planning a rebuild, migration, application, workflow change, or platform decision? Start with the business problem and the system behind it.

Book a discovery callContact me →
© 2026Build with Matija•All rights reserved•Privacy Policy•Terms of Service
BuildWithMatija
Get In Touch

Google Drive client_id for rclone, headless server setup

This is the short reference I keep for setting up an rclone Google Drive client ID on a headless Ubuntu server. It follows the rclone Drive docs on making your own client ID, plus the details I tripped over.

Because the default rclone Google Drive client_id is shared by many users, it can hit Google rate limits more easily. For a more stable setup, create your own Google OAuth app and use its client_id and client_secret in rclone.

Why this matters

  • Better reliability than the shared default rclone client
  • Lower chance of quota and rate-limit issues
  • Better for production and multiple services

What I had to create

When creating the Google OAuth app, I had to choose:

  • Application type: Desktop app

This is correct for rclone authentication, even if the final usage is on a headless Ubuntu server.

Steps

  1. Open the Google API Console and create or select a project.

  2. Enable Google Drive API.

  3. Open Credentials.

  4. Configure the OAuth consent screen.

    • App name: anything, for example rclone
    • Audience: usually External
    • Add yourself as a test user
  5. In Data Access, add these scopes:

    • https://www.googleapis.com/auth/docs
    • https://www.googleapis.com/auth/drive
    • https://www.googleapis.com/auth/drive.metadata.readonly
  6. Save the consent screen settings.

  7. Create an OAuth client.

  8. Choose Desktop app.

  9. Copy the generated:

    • client_id
    • client_secret
  10. Put them into your rclone Google Drive remote config.

  11. Reconnect/authenticate the remote.

Notes

  • Even on a headless server, the OAuth client type should still be Desktop app.
  • Google may show an unverified app warning during login. That is expected for a personal setup.
  • For External apps, adding yourself as a test user is important.

Useful rclone command

To reconnect the remote after adding your own credentials:

bash
rclone config reconnect hetzner-dev:

Result

After reconnecting, I was able to download files from Google Drive directly to:

bash
~/smow/db_dumps

Keep the token from expiring after 7 days

If the consent screen stays in Testing, Google expires the refresh token after 7 days, and your scheduled syncs start failing with auth errors. For a personal setup, set the publishing status to In production. The app stays unverified, so you still see the warning at login, but the token no longer expires weekly. Then run rclone config reconnect once more.

What to do next

This setup is the Drive half of a few bigger workflows I run:

  • Authorizing Google APIs from a terminal works the same way in the Google Ads MCP setup guide, which also uses a Desktop app OAuth client.
  • If you want Drive connected to an app instead of a CLI, see Google Drive OAuth for Payload CMS, which uses a Web application client.

Comments