This guide takes you through the steps a Site Manager needs to perform to get the google API key to enable ContestPad to use google services such as YouTube integration, location services and authentication services.
Starting point: Google Browser (API) Key
A Browser Key for Google API is needed to allow entrants on your contest the ability to browser and select YouTube videos.
The follow step-by-step guides walks you through creating a project and enabling the desired API via the Google Developer Console.
- Launchpad6 contest site (you can start a trial at http://manager.us.launchpad6.com/trial)
- Google account, which will be used to authenticate users against
Step 1 – Create a project on Google Developer Console
Navigate to https://console.developers.google.com and sign-in as the google account that you will use to integrate google services with your contest site.
To create a project on Google Developer Console, login to the developer console and create a new project (you can use an existing project if you so wish) by clicking “Select a project” drop down.
Then click on new project
Once you click on “Create project…” link, you will need to provide your project a name and other required fields.
Click “Create” button to create a project.
Step 2 – Selecting your project
Ensure the correct project is selected this can be down by selecting the drop-down menu from the project selector.
Note: that if you have Google Suite you may need to switch to your organization to be able to see and select the project you had created.
Step 3 – Setup OAuth 2.0 client
Setup WebApp client to allow entrants the ability to authenticate using google ID.
First setup the OAuth Consent screen, this is the screen that is shown to the entrants when they try to login. Select the Configure Consent Screen button.
You must select whether the consent will be used for Internal or External users. Your app will be using External users.
You now enter the following information:
- Application name: The name of your contest or contest site
- Application logo: Set this to the logo of your organisation. This is displayed in the google consent form if Google is used for authentication
- Support email: This is the email used to display in the consent screen if support is required. This is selected from your gmail account.
- Authorized domains: This is the root domain for the registered subdomain you are using for your contest.
- Application Homepage link: This is the homepage for your contest e.g. contest.<company>.com. It is recommended you use the contest domain without the folder name and then just set the default page for the currently active contest.
- Application Terms of Service Link: This should be the link to your terms and conditions page for your contest.
Once you select save you are now you are ready to create an OAuth client ID to represent your Launchpad6 contest site.
Select the credentials tab (ensure you are setting for the project you setup the consent form in the last step).
Select Create Credentials and then select OAuth client ID.
Select Web application as your Application type
You will need provide:
Name: A name to identify your content web client
Then click Create.
You will be provided with the client ID and the client secret on the next screen, copy these two values as you will need to add them to your launchpad6 site.
Important: A message will be displayed that the OAuth limited until the app is authorised. Your contest will need to be authorised by Google if you are using Google based social authentication.
Step 3 – Enable Desired API
Once the project is created you will have to enable the YouTube APIs on Developer Console in order to use it. To enable the API, click on “Enable APIs and Services” link on the Dashboard of the newly created project.
Now, from the landing page either search or navigation and enable the APIs based on the requirements for your contest.
Google+ API – Required for all integrations between your contest site and Google.
YouTube Data API
If you are sending videos to YouTube you now need to enable the YouTube Data API's.
Go back to the Dashboard by selecting the GoogleAPIs logo in the top left and select Enable APIs and Service again.
This time search for YouTube and Select the YouTube Data API.
Unless you are using the deprecated YouTube selector you can now skip to step 4
Note the following YouTube picker capability is being deprecated in ContestPad and replaced with YouTube share links only.
Google Picker API – Required if you want to allow users to be able to select YouTube video on the contest entry page
Step 3a – Create Browser Key Credentials to allow entrants to select YouTube videos
If you are going to allow entrants to be able to select YouTube videos to submit as their contest entry you will need to create a Browser Key Credential in addition to the enabling Google Picker API in the previous step.
To get a new Browser (API) Key, click on “Credentials” section on the left panel of the console and select “Create Credentials” drop-down link on the credentials page. Then select “API Key” from the drop-down list.
Click on Restrict Key, to change the name of the API key and to restrict the http referrer.
When you select HTTP referrers (web sites) as the application restriction, you will need to provide Accept requests from these HTTP referrers (web sites).Add the HTTPS URL of your contest site, making sure you include /* at the end. For example, https://contestjs.us.launchpad6.com/* .
Note: if you are using a custom domain you will need to add the HTTPS URL of the custom domain here as well i.e. https://contest.mycontest.com/*
Step 4 – Add Google credentials to your contest site
Access your admin dashboard and navigate to global site setting.
Navigate to the Social Authentication section and Google Client ID, Google Secret and optionally Google Browser Key.
Step 5 - Submit your contest for verification
Before you start the verification process, review the OAuth Application Verification FAQ. This will help your verification process go quickly. To start the verification process for you contest, do the following steps:
- Verify your website ownership through Search Console by using an account that is a Project Owner or a Project Editor on your OAuth project. The same account must be a verified owner of the property in Search Console. For more information about Search Console permissions, see Managing owners, users, and permissions. Google can't approve your OAuth verification request until your site ownership verification is complete. For more information, see Verify your site ownership.
- To start the verification process, submit a verification request by using the following process. Note that the Verification required dialog is a beta feature that might not be available for all users at this time.
- On the GCP Console OAuth consent screen, click Submit or Save.
- If a Verification required dialog displays:
- Add information in the text boxes for Google to verify your OAuth consent screen.
- When you're finished entering details, click Submit.