Android SDK Below 14 Shows 403 dailyLimitExceededUnreg Error with Google Drive API

I’m encountering an unusual issue when attempting to use the Google Drive API on older Android devices. The application performs perfectly on Android 4.0 and higher, but it fails on versions prior to that.

This is how I configure the Drive service:

private Drive createDriveService(final GoogleCredential userCredentials) {
    return new Drive.Builder(AndroidHttp.newCompatibleTransport(), 
                            new GsonFactory(), 
                            userCredentials)
            .build();
}

I obtain the credentials via AccountManager, and everything functions correctly on newer devices. I can upload, download, and delete files without any issues. However, when I test on devices running Android versions below 4.0, I continuously receive this error:

{
  "error": {
    "errors": [
      {
        "domain": "usageLimits",
        "reason": "dailyLimitExceededUnreg",
        "message": "Daily Limit Exceeded. Please sign up"
      }
    ],
    "code": 403,
    "message": "Daily Limit Exceeded. Please sign up"
  }
}

I am utilizing the most recent version of the Google Drive API and the Google API client library (version 1.14.1). Is this potentially a compatibility issue with the older versions of Android? Has anyone experienced a similar problem?

sounds like the HTTP trnsp is sending malformed headers on older android versions. try NetHttpTransport instead of AndroidHttp.newCompatibleTransport() - i’ve had similar issues with pre-4.0 devices where google’s servers weren’t recognizing the requests as properly authenticated.

I’ve hit this exact problem. Google’s auth servers don’t recognize requests from older Android SDK versions, even with valid credentials. Your code’s fine - it’s how the old Android HTTP stack handles SSL certs and auth headers.

What fixed it for me: downgrade to Google API client library 1.10.x when targeting pre-4.0 devices. The newer libraries expect SSL features that weren’t fully baked into early Android versions.

Also double-check your API key setup in Google Console - make sure you’ve got the right package name and SHA1 fingerprint for your debug/release builds.

The dailyLimitExceededUnreg error indicates that Google’s servers are unable to properly identify the API credentials for your app. This issue is particularly prevalent on older Android versions, which have known discrepancies with SSL implementations compared to modern ones.

I faced a similar challenge while supporting legacy devices. Essentially, Android versions prior to 4.0 utilize an outdated SSL stack that often fails to transmit client certificate information accurately during the authentication process. As a result, Google’s servers interpret these incomplete requests as being from an unregistered app, hence the ‘unreg’ designation.

Consider implementing a fallback mechanism that detects the Android version, allowing for distinct authentication parameters tailored for older devices. Some developers have resolved this by explicitly specifying additional headers or adopting an alternate credential refresh approach for these specific scenarios.