public static string Translate(string text) { AdmAccessToken admToken; string headerValue; //Get Client Id and Client Secret from https://datamarket.azure.com/developer/applications/ //Refer obtaining AccessToken (http://msdn.microsoft.com/en-us/library/hh454950.aspx) AdmAuthentication admAuth = new AdmAuthentication("bicClient", "WzoZYDtxHMKjrxfXmFy+ML7K18/7nWE+We3SZcs2x+I"); admToken = admAuth.GetAccessToken(); // Create a header with the access_token property of the returned token headerValue = "Bearer " + admToken.access_token; return TranslateMethod(headerValue,text); }
public static string Translate(string text) { AdmAccessToken admToken; string headerValue; //Get Client Id and Client Secret from https://datamarket.azure.com/developer/applications/ //Refer obtaining AccessToken (http://msdn.microsoft.com/en-us/library/hh454950.aspx) AdmAuthentication admAuth = new AdmAuthentication("bicClient", "WzoZYDtxHMKjrxfXmFy+ML7K18/7nWE+We3SZcs2x+I"); admToken = admAuth.GetAccessToken(); // Create a header with the access_token property of the returned token headerValue = "Bearer " + admToken.access_token; return(TranslateMethod(headerValue, text)); }