Here is my code:

using Google.Apis.Authentication.OAuth2;
using Google.Apis.Authentication.OAuth2.DotNetOpenAuth;
using Google.GData.Spreadsheets;
using System;
using System.Collections.Generic;
using Google.GData.Client;

    static void Main(string[] args)
    {
        OAuth2Parameters parameters = new OAuth2Parameters();
        parameters.ClientId = "CLIENT_ID";
        parameters.ClientSecret = "CLIENT_SECRET";
        parameters.RedirectUri = "urn:ietf:wg:oauth:2.0:oob";
        parameters.Scope = "https://spreadsheets.google.com/feeds 
https://docs.google.com/feeds";;

        string authorizationUrl = 
OAuthUtil.CreateOAuth2AuthorizationUrl(parameters);

        parameters.AccessToken = "AccessToken";

        GOAuth2RequestFactory requestFactory =
            new GOAuth2RequestFactory(null, "web-123611", parameters);
        SpreadsheetsService service = new SpreadsheetsService("web-123611");
        service.RequestFactory = requestFactory;
        SpreadsheetQuery query = new SpreadsheetQuery();
        SpreadsheetFeed feed = service.Query();
  }


On call:

  SpreadsheetFeed feed = service.Query();

Appeared the message: Value cannot be null

<https://lh3.googleusercontent.com/-N-N2SJOSSUA/VuFnyGZ3lDI/AAAAAAAAClE/rfjp3-NSc08/s1600/qBahJ.png>




-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to