Am trying to connect to the google calendar using the following code:

        Dim scopes As IList(Of String) = New List(Of String)()
        Dim secrets As New ClientSecrets() With { _
          .ClientId = "1013534535390-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", _
          .ClientSecret = "3eusdffvxxxY4tBPeIMPjj0" _
         }
        Dim service As CalendarService
        scopes.Add(CalendarService.Scope.Calendar)
        Dim credential As UserCredential
        Try
            credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                       secrets, scopes, "user", CancellationToken.None, New FileDataStore("Calendar.Auth.Store")).Result
            Dim initializer As New BaseClientService.Initializer()
            initializer.HttpClientInitializer = credential
            initializer.ApplicationName = "VB.NET Calendar Sample"
            service = New CalendarService(initializer)
            Dim list As IList(Of CalendarListEntry) = service.CalendarList.List().Execute().Items()
            DisplayList(list)
            For Each calendar As Data.CalendarListEntry In list
                ' DisplayFirstCalendarEvents(calendar)
            Next

am referring the following link everything work fine except i am unable to specify the redirect uri by default it takes as redirect_uri=http://localhost:56267/authorize/ how can i change this redirect uri?

Related posts

Recent Viewed