private static void AddTranslationMethod(string authToken, string sourcetextforadd) { // Add TranslatorService as a service reference, Address:http://api.microsofttranslator.com/V2/Soap.svc TranslatorService.LanguageServiceClient client = new TranslatorService.LanguageServiceClient(); //Set Authorization header before sending the request HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Method = "POST"; httpRequestProperty.Headers.Add("Authorization", authToken); // Creates a block within which an OperationContext object is in scope. using (OperationContextScope scope = new OperationContextScope(client.InnerChannel)) { OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; //string sourcetextforadd = "una importante contribución a la rentabilidad de la empresa"; try { //Keep appId parameter blank as we are sending access token in authorization header. client.AddTranslation("", sourcetextforadd, "an important contribution to the company profitability.", "en", "hi", 1, "text/plain", "general", "TestUserID", null); Console.WriteLine("Your translation for {0} has been added", sourcetextforadd); } catch (Exception ex) { Console.WriteLine("An error occurred while adding translation. " + ex.Message); } Console.WriteLine("Press any key to continue..."); Console.ReadKey(true); } }