Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot
added 255 characters in body
Source Link
Java_Alert
  • 1.2k
  • 6
  • 25
  • 51

I got the further help from this link to resolve 400 - Unable to parse range: Class Data!A2:A4"

400 Bad Request Resolution

I got the further help from this link to resolve 400 - Unable to parse range: Class Data!A2:A4"

400 Bad Request Resolution

added 1627 characters in body
Source Link
Java_Alert
  • 1.2k
  • 6
  • 25
  • 51

Update -

If i am passing email id in the example instead of user then its is giving me this response.

Changes -

public static Credential authorize() throws IOException { // Load client secrets. InputStream in = SheetsQuickstart.class.getResourceAsStream("/client_secret.json"); GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in)); // Build flow and trigger user authorization request. GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder( HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES) .setDataStoreFactory(DATA_STORE_FACTORY) .setAccessType("offline") .build(); //Changed Part. Credential credential = new AuthorizationCodeInstalledApp( flow, new LocalServerReceiver()).authorize("[email protected]"); System.out.println( "Credentials saved to " + DATA_STORE_DIR.getAbsolutePath()); return credential; } 

Response -

Name, Major Alexandra, English Andrew, Math Anna, English Becky, Art Benjamin, English Carl, Art Carrie, English Dorothy, Math Dylan, Math Edward, English Ellen, Physics Fiona, Art John, Physics Jonathan, Math Joseph, English Josephine, Math Karen, English Kevin, Physics Lisa, Art Mary, Physics Maureen, Physics Nick, Art Olivia, Physics Pamela, Math Patrick, Art Robert, English Sean, Physics Stacy, Math Thomas, Art Will, Math 

Update -

If i am passing email id in the example instead of user then its is giving me this response.

Changes -

public static Credential authorize() throws IOException { // Load client secrets. InputStream in = SheetsQuickstart.class.getResourceAsStream("/client_secret.json"); GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in)); // Build flow and trigger user authorization request. GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder( HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES) .setDataStoreFactory(DATA_STORE_FACTORY) .setAccessType("offline") .build(); //Changed Part. Credential credential = new AuthorizationCodeInstalledApp( flow, new LocalServerReceiver()).authorize("[email protected]"); System.out.println( "Credentials saved to " + DATA_STORE_DIR.getAbsolutePath()); return credential; } 

Response -

Name, Major Alexandra, English Andrew, Math Anna, English Becky, Art Benjamin, English Carl, Art Carrie, English Dorothy, Math Dylan, Math Edward, English Ellen, Physics Fiona, Art John, Physics Jonathan, Math Joseph, English Josephine, Math Karen, English Kevin, Physics Lisa, Art Mary, Physics Maureen, Physics Nick, Art Olivia, Physics Pamela, Math Patrick, Art Robert, English Sean, Physics Stacy, Math Thomas, Art Will, Math 
Removing not requried tag.
Link
Java_Alert
  • 1.2k
  • 6
  • 25
  • 51
Loading
Source Link
Java_Alert
  • 1.2k
  • 6
  • 25
  • 51
Loading