title: Creating Courses in classroom:Request had insufficient authentication scopes
body: <p>While creating course in google classroom api am getting an issue:</p>
  
  <pre><code> { "code" : 403,
      "errors" : [ {
       "domain" : "global",
      "message" : "Request had insufficient authentication scopes.",
       "reason" : "forbidden"
       } ],
      "message" : "Request had insufficient authentication scopes.",
       "status" : "PERMISSION_DENIED"
       }
  </code></pre>
  
  <p>my code:</p>
  
  <pre><code> private class MakeRequestTask extends AsyncTask {
  
          private com.google.api.services.classroom.Classroom mService = null;
  
          private Exception mLastError = null;
  
          MakeRequestTask(GoogleAccountCredential credential) {
  
              HttpTransport transport = AndroidHttp.newCompatibleTransport();
              JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
              mService = new com.google.api.services.classroom.Classroom.Builder(
                      transport, jsonFactory, credential)
                      .setApplicationName("Classroom API Android Quickstart")
                      .build();
              Log.i("RR","mService"+mService);
  
          }
  
          /**
           * Background task to call Classroom API.
           *
           * @param params no parameters needed for this task.
           */
          @Override
          protected Object doInBackground(Object[] params) {
              try {
                  Course course = new Course()
                          .setName("10th Grade Biology")
                          .setSection("Period 2")
                          .setDescriptionHeading("Welcome to 10th Grade Biology")
                          .setDescription("We'll be learning about about the structure of living creatures "
                                  + "from a combination of textbooks, guest lectures, and lab work. Expect "
                                  + "to be excited!")
                          .setRoom("301")
                          .setOwnerId("Bio10")
                          .setCourseState("PROVISIONED");
                  course = mService.courses().create(course).execute();
                  System.out.printf("Course created: %s (%s)\n", course.getName(), course.getId());
  
             return course;
              } catch (Exception e) {
                  mLastError = e;
                  cancel(true);
                  return null;
              }
          }
  
  
  
  
          @Override
          protected void onPreExecute() {
              mOutputText.setText("");
              mProgress.show();
          }
  
          @Override
          protected void onPostExecute(Object data) {
              mProgress.hide();
              if (data == null ) {
                  mOutputText.setText("No results returned.");
              } else {
                 // data.add(0, "Data retrieved using the Classroom API:");
                  mOutputText.setText(String.valueOf(data));
              }
          }
  
          @Override
          protected void onCancelled() {
              mProgress.hide();
              if (mLastError != null) {
                  if (mLastError instanceof GooglePlayServicesAvailabilityIOException) {
                      showGooglePlayServicesAvailabilityErrorDialog(
                              ((GooglePlayServicesAvailabilityIOException) mLastError)
                                      .getConnectionStatusCode());
                  } else if (mLastError instanceof UserRecoverableAuthIOException) {
                      startActivityForResult(
                              ((UserRecoverableAuthIOException) mLastError).getIntent(),
                              Sample1.REQUEST_AUTHORIZATION);
                  } else {
                      mOutputText.setText("The following error occurred:\n"
                              + mLastError.getMessage());
                      Log.i("RR","--"+mLastError.getMessage());
                  }
              } else {
                  mOutputText.setText("Request cancelled.");
              }
          }
  
      }
  </code></pre>
  
  <p>I don't know what name should give to ownerid,whether this code correct or not.</p>