karishmal / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Erro ao Autenticar #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Autentication

Eu ESTOU usando o Google Previsão e Preciso de Autenticar parágrafo Fazer 
Minhas previsões. quando peco autorização eu Passo o:

          / / Mostra o cabeçalho e inicializar a amostra.
            CommandLine.EnableExceptionHandling ();
            CommandLine.DisplayGoogleSampleHeader ("Tasks API");

            / / Registra o autenticador.
            / / Pega a URL auth:
            / / IAuthorizationState estado = new AuthorizationState (new [] {TasksService.Scopes.Tasks.GetStringValue ()});

            var fornecedor = new NativeApplicationClient (GoogleAuthenticationServer.Description);
            Credenciais FullClientCredentials = new FullClientCredentials ();
            credentials.ApiKey = "AIzaSyCrNndiZazK3zbJxdZu6cSfVCLLuN5FFog";
            credentials.ClientId = "741663684804-uqr49f937fi48l5apg9rnmreq7b4ugp6.apps.googleusercontent.com";
            credentials.ClientSecret = "I7uvCW8gsnmVz2_fy0u8Uef3";
            provider.ClientIdentifier = credentials.ClientId;
            provider.ClientSecret = credentials.ClientSecret;
            auth = var <NativeApplicationClient> OAuth2Authenticator novo (GetAuthorization provedor);

            Escopos List <string> = <string> nova lista ();
            scopes.Add("https://www.googleapis.com/auth/plus.me");
            scopes.Add("https://www.googleapis.com/auth/userinfo.email");
            var estado = new AuthorizationState (escopos);
            state.Callback = new Uri ("http://localhost:15709");

            var service = TasksService novo (auth);
            Resultados TaskLists service.Tasklists.List = () Fetch ().;
      }

Só Que quando eu solicito uma Autenticação elemento Retorna ESSE Erro: 

Login necessário [401]
Erros [Mensagem [Login Obrigatório Localização] Autorização [- cabeçalho 
Razão] [necessário] Domínio [global]

Alguem PoDE ME AJUDAR?

Original issue reported on code.google.com by produtos...@gmail.com on 7 Aug 2012 at 5:32

GoogleCodeExporter commented 9 years ago
Sorry, I do not speak Portuguese, so I am replying via auto-translate, please 
forgive errors.

The code sample you provided seems incompleat, looking at the code it will not 
compile, for me to look further into this I will need a more compleat code 
sample.

It may be easier for you to start from one of the existing code samples and 
modify it then to start from nothing.

Desculpe, eu não falo Português, então eu estou respondendo via 
auto-traduzir, por favor, perdoe os erros.

O exemplo de código que você forneceu parece incompleat, olhando para o 
código não vai compilar, para eu olhar mais para isso eu preciso de uma 
amostra mais código compleat.

Pode ser mais fácil para você começar a partir de um dos exemplos de código 
existentes e modificá-lo, em seguida, começar do nada.

Original comment by davidwat...@google.com on 28 Aug 2012 at 7:49