Bing translator has changed its API recently, and it forces developers to use a more complicated way than the previous way using AppID.
The new API involves a temporal token, named as access token, which will expire in 10 minutes after you get it.
The detailed steps of using the new API with access tokens are as follows (all the parameters for the curl command should be used after URL encode):
(1) sign up for API access at Azure Data Market, from which you can get your Client Secret (a string, in My Account -> Account Keys);
(2) register the client application (that is, the app using the API), where you can create your own Client ID and Name, and you also have to type in redirect URI which should be a valid URL address (like "http://www.....");
(3) to get an access token, make a POST request to:
curl -d 'grant_type=client_credentials&client_id=Client ID&client_secret=Client Secret&scope=http://api.microsofttranslator.com' https://datamarket.accesscontrol.windows.net/v2/OAuth2-13 | python -m json.tool
The returned data is in JSON format, in which you can find your temporal access token (a string, which is the value of the key "access_token").
(4) make POST requests to the Bing translator API with the access token to ask Bing to translate texts;
curl -H 'Authorization:bearer Your-Access-Token' 'http://api.microsofttranslator.com/V2/Http.svc/Translate?text=hello&from=en&to=zh-CHS'
(5) go back to (3), if the access token expires after 10 minutes, and we need to renew it again every 10 minutes.