To obtain a Bing Maps token for use in your Bing Maps Web Services or Bing Map Control application, you need to make a request to the Bing Maps Token Service.
Accessing the Token Service
In order to access the Bing Maps Token Service, you must have a Bing Maps for Enterprise Developer Account ID. To get a developer account ID, follow the steps below.
- Get a Windows Live ID at https://login.live.com. If you already have a Windows Live ID, you can use it instead of creating a new one.
- Sign up for a Bing Maps for Enterprise developer account. Go to https://mappoint-css.live.com/mwssignup and sign up for a free evaluation developer account.
- Once you have received account creation confirmation email, you can manage your Bing Maps for Enterprise developer account on the Bing Maps Customer Services site. You use your Windows Live ID to log in to the Bing Maps Customer Services site.
- On the Manage Account page of the Bing Maps Customer Services site you will find your Account ID. The Manage Password page allows you to set the password for this account ID.
- If you are using Visual Studio to build your application, then in your web application project add a web reference to the staging or production Bing Maps Token Service. More information is found in the Referencing the Token Service section below.
- Set your account ID and account password in the Credentials property of the CommonServiceSoap Class before making requests to the Bing Maps Token Service using the CommonServiceSoap.GetClientToken Method.
- The CommonServiceSoap.GetClientToken Method returns a string, which is the Bing Maps Token Service. This token can be used in your Bing Maps Web Services or Bing Map Control application.
Referencing the Token Service
Token Service URLs
Bing Maps provides a staging environment to test your application and a production environment to use once you have become a licensed customer.
Note Developer evaluation accounts only have access to the Staging environment.
To access the Production environment, you must be a licensed customer. Contact the Bing Maps Licensing Team for more information.
Note Activity in the production environment is billable. For more information about Billable Transactions, see the Viewing Bing Maps Transaction Reports topic.
Adding the Token Service as a Visual Studio Web Reference
The steps below outline adding a web reference to the Token Service from your Visual Studio project.
- Launch the Add Web Reference dialog. Select the Add Web Reference item from either the Project menu or the contextual menu for the project in the Solution Explorer.
Note: |
|---|
| If you are using Visual Studio 2008 and Add Web Reference is not present in either the Project menu or the contextual menu for the project, do the following:a. Select the Add Service Reference menu item.b. Click on Advanced.c. Click on Add Web Reference. |
- Enter either the staging or production Token Service URL from above for the Url and click Go.
- When prompted, enter your Bing Maps Developer Account ID and Password.
- Once the WSDL has been downloaded, give the web reference a name such as "TokenService". Click Add Reference.