title: GoogleAuthException: UNREGISTERED_ON_API_CONSOLE when trying to append to Google Sheets API V4
body: <p>I've been encountering a plethora of issues with this current project, which can be found in the other questions that I have posted on StackOverflow (one of which is unsolved), but after dodging my other issue in a way that allows me to test, but not actually release, the app, I've encountered another error;
  In this code:</p>
  <pre><code>public class AsyncSheetUpdater extends AsyncTask&lt;String, Void, String&gt; {
  
      Master activity;
  
      @Override
      protected String doInBackground(String... urls) {
          GoogleAccountCredential credential;
  
          Sheets mService;
  
          credential = GoogleAccountCredential.usingOAuth2(activity.getApplicationContext(), Collections.singletonList(SheetsScopes.SPREADSHEETS))
                  .setBackOff(new ExponentialBackOff())
                  .setSelectedAccountName(&quot;oscarcookeabbott@gmail.com&quot;);
  
          HttpTransport transport = AndroidHttp.newCompatibleTransport();
          JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
  
          mService = new Sheets.Builder(transport, jsonFactory, credential)
                  .setApplicationName(activity.getString(R.string.app_name))
                  .setSheetsRequestInitializer(new SheetsRequestInitializer(&quot;AIzaSyBreJks4awhrSbyqGkZhgR4rAA61vg0t-g&quot;))
                  .build();
  
          ValueRange values = new ValueRange();
          values.set(&quot;EMAIL&quot;, &quot;[INSERT EMAIL]&quot;);
          values.set(&quot;AUTH&quot;, &quot;[INSERT DATE]&quot;);
          values.set(&quot;SUB&quot;, &quot;[INSERT DATE + MONTH]&quot;);
  
          try {
              mService.spreadsheets().values().append(&quot;1meAAvjdPmghn6wl_IKc-_NJx_M85I_yqsn4Nwm_j_X0&quot;, &quot;Users&quot;, values)
                      .setValueInputOption(&quot;RAW&quot;)
                      .execute();
          } catch (IOException e) {
              Log.e(&quot;DEBUG&quot;, &quot;SheetUpdate Exception: &quot;, e);
          }
  
          return null;
      }
  }
  </code></pre>
  <p>It is returning this error:</p>
  <pre><code>com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException
     at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:301)
     at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
     at com.pybuspr.listeau.AsyncSheetUpdater.doInBackground(AsyncSheetUpdater.java:58)
     at com.pybuspr.listeau.AsyncSheetUpdater.doInBackground(AsyncSheetUpdater.java:20)
     at android.os.AsyncTask$2.call(AsyncTask.java:304)
     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
     at java.lang.Thread.run(Thread.java:761)
  Caused by: com.google.android.gms.auth.GoogleAuthException: UNREGISTERED_ON_API_CONSOLE
     at com.google.android.gms.auth.zze$1.zzbt(Unknown Source)
     at com.google.android.gms.auth.zze$1.zzbu(Unknown Source)
     at com.google.android.gms.auth.zze.zza(Unknown Source)
     at com.google.android.gms.auth.zze.zzc(Unknown Source)
     at com.google.android.gms.auth.zze.getToken(Unknown Source)
     at com.google.android.gms.auth.zze.getToken(Unknown Source)
     at com.google.android.gms.auth.zze.getToken(Unknown Source)
     at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
     at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:269)
     at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:294)
  </code></pre>
  <p>This is what my Google APIs Credentials look like:
  <a href="https://i.stack.imgur.com/Rj7Sz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rj7Sz.jpg" alt="enter image description here" /></a></p>
  <p>I was really hoping that sheet editing was going to be simple, such as how you can use a straight JSON feed of a Sheet without using the APIs, but it seems I was mistaken.</p>