我剛開始使用API更新智能工作表文檔。在公司防火牆後面訪問SmartSheet API C#
在SDK參考中使用示例(csharp-read-write-sheet),只要我在打開的Internet連接上,我就可以更新文檔,但是,當我連接到公司LAN時它報告了代理身份驗證問題。
這是從SDK代碼
string accessToken = ConfigurationManager.AppSettings["AccessToken"];
if (string.IsNullOrEmpty(accessToken))
accessToken = Environment.GetEnvironmentVariable("SMARTSHEET_ACCESS_TOKEN");
if (string.IsNullOrEmpty(accessToken))
throw new Exception("Must set API access token in App.conf file");
// Get sheet Id from App.config file
string sheetIdString = ConfigurationManager.AppSettings["SheetId"];
long sheetId = long.Parse(sheetIdString);
// Initialize client
SmartsheetClient ss = new SmartsheetBuilder().SetAccessToken(accessToken).Build();
// Load the entire sheet
Sheet sheet = ss.SheetResources.GetSheet(sheetId, null, null, null, null, null, null, null);
Console.WriteLine("Loaded " + sheet.Rows.Count + " rows from sheet: " + sheet.Name);
能否請您指教我該怎麼配置API提供System.Net.WebProxy
對象到客戶端API通過公司代理提供認證路線
好的,謝謝......但是,您能否將此添加爲下一個發佈週期的功能。 –
唯一的問題是,這不允許提供憑據(請參閱下面的我自己的答案) –
是的,添加到我們的積壓 –