Доступ к пути 'token. json' запрещен API листов Google. - PullRequest
0 голосов
/ 10 марта 2020

enter image description here

using (var stream = new FileStream(a, FileMode.Open, FileAccess.Read))
                    {
                        string credPath = "token.json";
                        credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                            GoogleClientSecrets.Load(stream).Secrets,
                            Scopes,
                            "user",
                            CancellationToken.None,
                            new FileDataStore(credPath, true)).Result;
                    }

Я пытаюсь подключиться к электронной таблице Google, но произошла ошибка при выполнении GoogleWebAuthorizationBroker.AuthorizeAsyn c.

Ошибка: доступ к пути 'token. json' запрещен.

...