Overview
Sometimes, you might reach an API limit when using the following functionality:
- Google Maps Shortcode: Street View or Directions
- YouTube Videos
Google Maps Embed Usage and Billing
To understand whether you need to define a Google Maps API key and setup billing, refer to the below table:
Map Type | Requires API Key | Requires Billing Setup on Google |
---|---|---|
Road Map | No | No |
Satellite Map | No | No |
Directions | Yes | Yes (see: https://developers.google.com/maps/documentation/embed/usage-and-billing#pricing-for-the-maps-embed-api, section “SKU: Embed Advanced”) |
Street View | Yes | Yes (see: https://developers.google.com/maps/documentation/embed/usage-and-billing#pricing-for-the-maps-embed-api, section “SKU: Embed Advanced”) |
Create a new Project
To obtain an API Key, first create a new Project in the Google APIs Console
- Visit https://console.developers.google.com/projectcreate
- Enter a Project name, and choose an Organization and Location. These values can be anything you want
- On the top left corner of the screen, click the dropdown
- Select the newly created Project
Enable the YouTube API
- In the search field below the Welcome to the API Library title, start typing YouTube Data API v3.
- Click on the result that appears
- Click on the blue Enable button
- Click on the Create Credentials button
- Click the dropdown below the Which API are you using? question, and select the YouTube Data API v3
- Click the dropdown below the Where will you be calling the API from? question, and select Web server
- For What data will you be accessing?, select Public data
- Click the What credentials do I need? button
- Make a note of the API key displayed on screen
Keep this safe. We’ll be adding it to the Page Generator Pro Plugin settings later on. - Click Done
Enable the Google Maps API
To get an API Key for Google Maps, refer to https://developers.google.com/maps/documentation/embed/get-api-key
This is only required if you use Street View or Direction modes when using the Plugin’s Google Maps shortcode. It is not required for road maps or satellite maps.
Add API Keys to Plugin Settings
Finally, we need to enter the API keys into Page Generator Pro:
- In your WordPress Administration interface, navigate to Page Generator Pro > Settings
- Click the Google tab, and enter each API key for the corresponding setting:
- YouTube Data API Key
- Google Maps API Key
- Click Save