Getting Started with Translator: Part One - Subscribe and get Credentials

Walkthrough: Signing up for Microsoft Translator and getting your credentials.

Microsoft Translator is a hosted service, accessed via an API that provides language translation. It can be used to build applications, web sites, utilities, or any scenario where you need language translation. In this article, you’ll walk, step-by-step, through everything you need to get started with using the Translator API to translate content by signing up for the service, registering an application, and getting your Client ID and Client secret.

Before you begin

There are a couple things you’ll need in order to be able to proceed.

Make sure that you have a free Microsoft account. You’ll need this to sign-in to Windows Azure Marketplace, subscribe to the service, and to build Windows 8 applications. You can sign up for one at http://login.live.com

Get Windows 8 and the Windows 8 developer tools from here: http://msdn.microsoft.com/en-US/windows/apps/br229516.aspx. You can download an evaluation copy of Windows 8 if you aren’t an MSDN subscriber. The Visual Studio 2012 Express tools are also free.

 

Get an account on Windows Azure Marketplace.

The Microsoft Translator API is accessible through Microsoft Windows Azure Marketplace. You can see it here: https://datamarket.azure.com/home/.

To begin developing using the Microsoft Translator API, you need to do the following:

  1. Register for an account on Windows Azure Marketplace.
    • If you already have an account, you can use it, but it’s recommended that you follow through these steps to ensure that you configure the service correctly
  2. Sign up for the Microsoft Translator API using your registered account.
  3. Register your application on Windows Azure Marketplace.
  4. Get the Client ID and Client Secret for your registered application.

The following instructions will show you how to do this. When you’ve completed them, you’ll be ready to start coding.

 

Step 1. Sign in and Register.

Sign-in to Windows Azure Marketplace. If this is your first time, you’ll likely see this registration page.

Fill out your details, and press the ‘Continue’ button.

clip_image002

You’ll be taken to the Terms of Use page. Read it carefully, and if you accept it, check the box at the bottom of the screen that says ‘I accept the Terms of Use’, and press the ‘Register’ button.

clip_image003

Once you’ve done this, you’ll be taken back to the main Windows Azure Marketplace webpage.

Step 2. Subscribe to the Microsoft Translator API.

In this section you’ll subscribe to the Microsoft Translator API in the Windows Azure Marketplace. There are a number of service options you can choose, and in this walkthrough you’ll see how to use the free one.

 

Step 2.1. Find the Microsoft Translator API service in the Windows Azure Marketplace

If you’ve completed the Windows Azure Marketplace registration (Step 1), then visit https://datamarket.azure.com/home/ to see the main Marketplace home page. At the top of the screen, you’ll see a ‘Search’ box.

Type ‘translator’ into this box and press enter, or click the button on the right that is shaped like a magnifying glass.

clip_image004

 

In the search results, you’ll see the Microsoft Translator API:

clip_image006

 

Step 2.2. Subscribe to the Translator API service.

Click on ’Microsoft Translator’ and you’ll be taken to the Microsoft Translator API Offer page on Windows Azure Marketplace.

(Note: For a short cut, you can also go directly to the screen by visiting this URL: https://datamarket.azure.com/dataset/bing/microsofttranslator)

On the right hand side of the screen, you’ll see a number of different monthly volume offers. Choose the one that meets your monthly volume usage needs. For this guide, you’ll use the free 2 million characters per month subscription offer, which you can find at the bottom of the list.

clip_image007

 

Press the ‘Sign Up’ link on your chosen offer and you’ll be taken to a page where you are asked to confirm and agree that you will adhere to the Translator API ‘Offer Terms and Privacy Policy’.

If you agree, check the box and press the Sign Up button.

clip_image008

 

You’ll then be taken to the page confirming that you’ve successfully subscribed to the service and the volume goes into effect at that time. In the next step, you’ll get your developer credentials from Windows Azure Marketplace, and you’ll use these when building your apps.

clip_image010

 

Step 3. Getting your Developer Credentials

This step assumes that you have:

· Completed Steps 1 and 2

· You have registered for a Windows Azure Marketplace account

· You have used your Marketplace account to subscribe to the Microsoft Translator API service.

 

Step 3.1. Registering your application on the Windows Azure Marketplace.

Sign in to https://datamarket.azure.com/home/, and you’ll see the familiar welcome page.

At the bottom of the page, you’ll see a number of links, organized into columns.

clip_image012

One of these reads ‘Develop’, and under it you’ll see a link that says ‘Register your Application’.

Select this and you’ll be taken to the screen that allows you register your application.

clip_image013

 

Step 3.2. Getting your Client ID and Client Secret

You use this to get the Client ID and Client Secret values that your application will need to authenticate your service when you build your application.

· Fill out the Client ID, and Name fields.

· The Client Secret field is already completed for you. Do not change it.

· Fill out the ‘Redirect URI’ field with any valid URL that uses https, for example https://microsoft.com. This field is not used by the Microsoft Translator API.

· You can also leave the ‘Enable subdomain access’ checkbox unchecked, as Translator doesn’t use it.

Remember and note the Client ID and Client Secret fields. You will need these when you write your app.

Here’s an example:

clip_image014

 

If, in the future you want to create new apps, you can go straight to this screen: https://datamarket.azure.com/developer/applications/register

To see a list of the apps you have on Marketplace, and see their Client ID and Client Secret visit: https://datamarket.azure.com/developer/applications and press the ‘Edit’ link to see the details for your app.

Next, you’ll be taken to a page containing the list of your applications. (Note: For future reference, here’s a shortcut: https://datamarket.azure.com/developer/applications)

 

You should see your application at the bottom of this screen, like this. If you want to change the Client ID, you can do so from the ’Edit’ link, or you can register new applications with the Register button.

clip_image016

Getting Started with Microsoft Translator - Part 2: Writing an ASP.NET Application