Using Xamrin.Auth

I am trying to use google drive services with flowing code and authentication

var auth = new OAuth2Authenticator (
clientId: "",
scope: "",
authorizeUrl: new Uri (""),
redirectUrl: new Uri ("myredirect:oob"));

and trying to initialize the google drive services by

var service = new DriveService(new BaseClientService.Initializer()
HttpClientInitializer = auth,
ApplicationName = "Google Drive API Sample",

but above code shows an error

Error CS0266: Cannot implicitly convert type 'Xamarin.Auth.OAuth2Authenticator' to 'Google.Apis.Http.IConfigurableHttpClientInitializer'. An explicit conversion exists (are you missing a cast?) (CS0266)

Please help me with the above problem


  • PragadeesPragadees USMember

    i am trying to use GoogleWebAuthorizationBroker which should be found in the name space using Google.Apis.Auth.OAuth2; but the above class is missing so pls help me to authorise google drive

Sign In or Register to comment.