I'm trying to call the spreadsheet API inside the app engine but I'm getting that error.
I tried to authenticate with a new service account also with default one but nothing changed. for spreadsheet, I have a library and I'm importing as a dependency to my actual pom. public static Credential authorize() throws IOException { try (InputStream in = fileLoader.getStream("spread_sheet_service_acc.json")) { //with service account List<String> scopes = Arrays.asList(SheetsScopes.SPREADSHEETS, SheetsScopes. DRIVE, SheetsScopes.DRIVE_FILE); Credential credential = GoogleCredential.fromStream (in).createScoped(scopes); //with default //HttpTransport transport = GoogleNetHttpTransport.newTrustedTransport(); // Credential credential = GoogleCredential.getApplicationDefault(transport, JacksonFactory.getDefaultInstance()).createScoped(scopes); return credential; } } public static Sheets getSheets() throws IOException, GeneralSecurityException { Credential credential = SpreadSheetUtil.authorize(); return new Sheets.Builder(GoogleNetHttpTransport.newTrustedTransport(), JACKSON_FACTORY, credential).setApplicationName(APPLICATION_NAME).build(); } com.google.appengine.api.appidentity.AppIdentityServiceFailureException: The AppIdentity service threw an unexpected error. Details: at com.google.appengine.api.appidentity.AppIdentityServiceImpl.handleApplicationError(AppIdentityServiceImpl.java:110) at com.google.appengine.api.appidentity.AppIdentityServiceImpl.getAccessTokenUncached(AppIdentityServiceImpl.java:237) at com.google.appengine.api.appidentity.AppIdentityServiceImpl.getAccessToken(AppIdentityServiceImpl.java:295) at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.intercept( AppIdentityCredential.java:98 <https://console.cloud.google.com/debug/fromlog?appModule=insightos-api&appVersion=spread-sheet-api&file=com%2Fgoogle%2Fapi%2Fclient%2Fgoogleapis%2Fextensions%2Fappengine%2Fauth%2Foauth2%2FAppIdentityCredential.java&line=98&logInsertId=5e8440b90001b3514b6ab94d&logNanos=1585725620480183000&nestedLogIndex=8&project=body-fit-dev>) at com.insightos.utils.authentication.AppEngineCredentialWrapper2.intercept( AppEngineCredentialWrapper2.java:50 <https://console.cloud.google.com/debug/fromlog?appModule=insightos-api&appVersion=spread-sheet-api&file=com%2Finsightos%2Futils%2Fauthentication%2FAppEngineCredentialWrapper2.java&line=50&logInsertId=5e8440b90001b3514b6ab94d&logNanos=1585725620480183000&nestedLogIndex=8&project=body-fit-dev>) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868 <https://console.cloud.google.com/debug/fromlog?appModule=insightos-api&appVersion=spread-sheet-api&file=com%2Fgoogle%2Fapi%2Fclient%2Fhttp%2FHttpRequest.java&line=868&logInsertId=5e8440b90001b3514b6ab94d&logNanos=1585725620480183000&nestedLogIndex=8&project=body-fit-dev>) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed( AbstractGoogleClientRequest.java:419 <https://console.cloud.google.com/debug/fromlog?appModule=insightos-api&appVersion=spread-sheet-api&file=com%2Fgoogle%2Fapi%2Fclient%2Fgoogleapis%2Fservices%2FAbstractGoogleClientRequest.java&line=419&logInsertId=5e8440b90001b3514b6ab94d&logNanos=1585725620480183000&nestedLogIndex=8&project=body-fit-dev>) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed( AbstractGoogleClientRequest.java:352 <https://console.cloud.google.com/debug/fromlog?appModule=insightos-api&appVersion=spread-sheet-api&file=com%2Fgoogle%2Fapi%2Fclient%2Fgoogleapis%2Fservices%2FAbstractGoogleClientRequest.java&line=352&logInsertId=5e8440b90001b3514b6ab94d&logNanos=1585725620480183000&nestedLogIndex=8&project=body-fit-dev>) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute( AbstractGoogleClientRequest.java:469 <https://console.cloud.google.com/debug/fromlog?appModule=insightos-api&appVersion=spread-sheet-api&file=com%2Fgoogle%2Fapi%2Fclient%2Fgoogleapis%2Fservices%2FAbstractGoogleClientRequest.java&line=469&logInsertId=5e8440b90001b3514b6ab94d&logNanos=1585725620480183000&nestedLogIndex=8&project=body-fit-dev> ) -- You received this message because you are subscribed to the Google Groups "Google Spreadsheets API" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-spreadsheets-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-spreadsheets-api/83f48033-26fb-4f2d-a113-99f93c162dc1%40googlegroups.com.