当我尝试获取 Google Auth Creds 的 Json 文件时,出现文件未找到错误
using (var stream = new FileStream("client.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleCredential.FromStream(stream)
.CreateScoped(Scopes);
}
service = new SheetsService(new Google.Apis.Services.BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = ApplicationName,
});
Run Code Online (Sandbox Code Playgroud)
我试图将文件存储在资产中并尝试过
Assets.Open ("client.json")
Run Code Online (Sandbox Code Playgroud)
它给出了同样的错误
我在这里错过了什么?