private static async Task GrabGoogleDocsAnswers() { string[] scopes = { DocsService.Scope.DocumentsReadonly }; string ApplicationName = "Google Docs API .NET Quickstart"; var secretsFile = "client_secret.apps.googleusercontent.com.json"; string credPath = "token.json"; UserCredential credential = await GoogleWebAuthorizationBroker.AuthorizeAsync( (await GoogleClientSecrets.FromFileAsync(secretsFile)).Secrets, scopes, "user", CancellationToken.None, new FileDataStore(credPath, true) ); Console.WriteLine("Credential file saved to: " + credPath); /* Create Google Docs API service. */ var service = new DocsService(new BaseClientService.Initializer() { HttpClientInitializer = credential, ApplicationName = ApplicationName, }); const string documentId = "1bfifCfwhLuhP-_dXvtQdgByGpcvvWIgDrRQbeQrExtg"; DocumentsResource.GetRequest request = service.Documents.Get(documentId); Document doc = await request.ExecuteAsync(); int counter = 0; while (counter < doc.Body.Content.Count) { if (doc.Body.Content[counter]?.Paragraph?.Bullet != null) { string a = string.Join("", doc.Body.Content[counter + 1].Paragraph.Elements.Select(e => e.TextRun.Content)); a = a.Replace("Answer: ", ""); QaDict.Add(new List <string> { ProcessString(doc.Body.Content[counter].Paragraph.Elements[0].TextRun.Content), ProcessString(a) }); counter++; } counter++; } }