bing-translator-api

Translator Text API | Microsoft Azure | Always ERROR 401000

冷暖自知 提交于 2020-07-21 04:07:40
问题 I tried to test Microsoft Translator API Text v3.0 but failed with 401 Access denied. I do standard cURL requests (HTTP POST) using PHP 7.3. $key = "************************"; // secret key here (from the Azure Portal) $host = "https://api.cognitive.microsofttranslator.com"; $path = "/translate?api-version=3.0"; $params = "&to=en&from=bg"; $text = "За мен лично хора, които задават такива въпроси са несъобразителни."; $requestBody = array( array( 'Text' => $text, ), ); $content = json_encode(

Bing translator exception while integrating with java application

China☆狼群 提交于 2019-12-12 02:37:30
问题 I am trying to integrate bing translator in my java application. I have registered to Microsoft azure cognitive service and Microsoft market place. while executing below code import com.memetix.mst.language.Language; import com.memetix.mst.translate.Translate; public class Main { public static void main(String[] args) { try{ Translate.setClientId(/* my Client Id */); Translate.setClientSecret(/* my Client Secret */); String translatedText = Translate.execute("Bonjour le monde", Language