API Fusion Table

19 views
Skip to first unread message

Michele Amelot

unread,
Sep 19, 2018, 5:33:26 PM9/19/18
to [deprecated] Google Maps JavaScript API v3. Please use the latest post.
Bonjour, j'ai un problème, je n'arrive pas à me connecter au service Fusion Table. J'ai un API et un credential OAuth.

 Public Function AuthenticateServiceAccount() As FusiontablesService
        Try
            Dim scopes As String() = New String() {FusiontablesService.Scope.Fusiontables}


            Dim credential As GoogleCredential

            Using stream = New FileStream("client_secret.json", FileMode.Open, FileAccess.Read)
                credential = GoogleCredential.FromStream(stream).CreateScoped(scopes)
            End Using

            Return New FusiontablesService(New BaseClientService.Initializer() With {
                .HttpClientInitializer = credential,
                .ApplicationName = "MonApplication"
            })

        Catch ex As Exception
            Console.WriteLine("Create service account AnalyticsService failed" & ex.Message)
            Throw New Exception("CreateServiceAccountAnalyticsServiceFailed", ex)
        End Try
    End Function

Message erreur:

"Unrecognized credential type"

Reply all
Reply to author
Forward
0 new messages