Get an OpenWeatherMap API Key and City ID

DMOPress has a built-in shortcode and widget that can show the current weather conditions at your destination. In order to use this feature, you’ll need to get an API key from OpenWeatherMap, as well as your OpenWeatherMap City ID.

Part 1: Create an OpenWeatherMap Account

  1. Visit this page on the OpenWeatherMap website and click the Sign Up button.
  2. Enter a username, email address and password in the fields provided.
  3. Agree to the Terms of Service by checking the box.
  4. Complete the Google “I’m not a robot” CAPTCHA by checking the box.
  5. Click the Create Account button.

Part 2: Get your OpenWeatherMap API Key

Once your OpenWeatherMap account has been created, you’ll be automatically logged in to the OpenWeatherMap members area.

  1. Click the API Keys tab.
  2. Your API key will be listed in the Key column. Copy this key to your clipboard.
  3. In your WordPress administration area, click Settings > DMOPress.
  4. Paste your copied API key into the OpenWeatherMap API Key field.
  5. Click the Save Changes button.

Part 3: Get your OpenWeatherMap City ID

  1. Go to www.openweathermap.org.
  2. Type the nearest city or town name into the Search field and click the Search button.
  3. Locate your city in the search results, and click on its name.
  4. The City ID can be found in your browser’s address bar (see screenshot below).
  5. Copy this number to your clipboard or write it down.
  6. In your WordPress administration area, click Settings > DMOPress.
  7. Paste your copied API key into the OpenWeatherMap City ID field.
  8. Click the Save Changes button.
OpenWeatherMap Screenshot of where to locate the City ID
Finding the City ID on the OpenWeatherMap website.