Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8200661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:31:39+00:00 2026-06-07T06:31:39+00:00

Since enabling 2-factor authentication (aka. 2-step verification) on Google, my Google export scripts no

  • 0

Since enabling 2-factor authentication (aka. 2-step verification) on Google, my Google export scripts no longer work. The computer is verified and trusted, but somehow the scripts are not. In effect, every time the cron job is run I receive a new “Google verification code” and the script fails. I assume it should be a simple matter to authenticate such scripts once and for all with wget or curl, but I couldn’t find any documentation for how to do it.


Google authentication schemes have gone through many iterations, and I can no longer seem to log in using curl or mechanicalsoup. I’ve tried using URLs like https://accounts.google.com/ServiceLogin?continue=https://calendar.google.com/calendar/exporticalzip&Email=username@gmail.com&Passwd=application-specific-password, and I always get redirected to a login page, usually with the message “Please use your account password instead of an application-specific password.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:31:41+00:00Added an answer on June 7, 2026 at 6:31 am

    Are you absolutely sure that you want to use 2-factor auth with the shell scripts? If so, you don’t need to try to get your computer or script as “trusted”. You just do the full 2-factor auth every time you run the script.

    If the target is to skip the manual second factor auth, I’d suggest using application-specific password instead (as already suggested by other answers). Just pretend that you’re not using 2-factor auth at all and use your real login name but set password to one generated at https://accounts.google.com/b/0/IssuedAuthSubTokens?hl=en (subpage of https://www.google.com/settings/security).

    The intent is to set Application-specific password “Name” to a value that is meaningful to you. For example, I have passwords labeled “Pidgin at work”, “My Android Phone”, “Thunderbird Google Address Book Extension at Work” etc. You could have one for “Calendar and Reader Export Script”. If you ever believe that this Application-specific password is compromised (“leaked”), just hit the “Revoke” link on the same page and then generate a new password for your script.

    For the code, just use the last version that worked with Google single factor auth. Update: because the original question used URL https://accounts.google.com/ServiceLogin for initiating the session login it’s practically faking browser login. However, Google does not officially support this and as I’m writing this, it seems that using application specific password for normal login will end up with error message “Please use your account password instead of an application-specific password”.

    One thing to understand about the Google 2-factor auth and “trusted computer” is that the actual implementation just adds a permanent cookie with 30 days expiry time to your browser. Trusted computer does not mean your IP address were trusted or some other magical connection were created. Unless your scripts capture the “trusted computer” cookie from your browser of choice, it does not matter at all if you’ve ever marked your computer as trusted. (The Google form should not say “Remember this computer for 30 days” but “Trust this browser and user account combination for 30 days (save permanent cookie)”. However, I guess that was considered too technical…)

    Update: (copied from my comment below) The only officially supported method (Server to Server applications) is documented at https://developers.google.com/accounts/docs/OAuth2ServiceAccount. It requires OAuth/JWT encoding the request and using Service Account private key created at https://code.google.com/apis/console. As an alternative you could use ClientLogin authentication (already deprecated, best effort service until 2015).

    If you decide to go with OAuth, you might want to look at http://blog.yjl.im/2010/05/bash-oauth.html and https://github.com/oxys-net/curl-oauth

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

since version 10 guava offers com.google.common.eventbus.EventBus - a generic pub-sub facility. It is not
Is this even possible? Since ive noticed v-sync doesnt work on my laptop at
since memcpy should be highly optimized nowadays, does it still make sense to optimize
Since regular jQuery animations are not fluent on iOS ( .hide() , slideDown() ),
since today im facing a strange problem. When i start my app in my
Since I am developing an iOS >= 5.0 application, I am trying to change
Since REST is stateless, each request that comes in has no knowledge of the
Since now I have only used plugin for editing and the way I use
Since input and raw_input() stop the program from running anymore, I want to use
Since I have no errors I don't know if this is the right place

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.