Skip to content

Instantly share code, notes, and snippets.

@Kurukshetran
Created November 2, 2017 12:52
Show Gist options
  • Save Kurukshetran/5904e8cb2361623498481f4a9a1338aa to your computer and use it in GitHub Desktop.
Save Kurukshetran/5904e8cb2361623498481f4a9a1338aa to your computer and use it in GitHub Desktop.
How to Create Your YouTube API Credentials
https://vidible.zendesk.com/hc/en-us/articles/207036056-How-to-Create-Your-YouTube-API-Credentials
Creating your YouTube API Credentials is accomplished by performing to main stages:
Stage I - Creating a Google OAuth 2.0 Web application client.
Stage II - Creating a YouTube refresh token.
Stage I - How to Create a Google OAuth 2.0 Web Application Client
To create your YouTube API credentials, perform the following steps:
Go to https://console.developers.google.com/project and login using your Google Credentials.
Click on 'Select a project' and select 'Create a project...'. A new project screen is displayed.
Enter a name for your project in the 'Project name' field.
Select if you would like to receive email updates by clicking 'Yes' or 'No'.
Click on 'Yes' to agree that your use of any services and related APIs is subject to your compliance with the applicable Terms of Service defined by Google.
Note: We recommend you read and review the applicable terms before agreeing.
Click on 'Create'. Your project is created and you will be redirected to your new project's dashboard.
Click on (the 'Menu' button). The developer console menu is displayed.
Select 'API Manager'. The API manager screen is displayed.
Click on 'YouTube Data API'. The YouTube data api overview screen is displayed.
Click on 'Enable API'. The API is enabled but cannot be used until you create credentials.
Click on 'Go to Credentials'. The credentials screen is displayed.
Click on 'Add credentials' and select 'OAuth 2.0 client ID' from the drop down menu. An OAuth 2.0 client ID screen is displayed but cannot be used until you configure a consent screen.
Click on 'Configure consent screen'. The OAuth consent screen is displayed.
Enter a product name in the 'Product name shown to users' field. This only a formality as this OAuth client will only be visible to you.
Click on 'Save'. Your OAuth consent screen is saved and will allow you to continue and define your OAuth client ID. The credentials create client ID screen is displayed.
Select 'Web application'.
Enter a name for your web client in the 'Name' field.
Copy and paste the following URL to the 'Authorized redirect URLs' field:
https://developers.google.com/oauthplayground
Click on 'Create'. Your OAuth web client is created and displayed.
Copy and paste your 'Client ID' and 'Secret' to your text editor.
Important! You will need both of these credentials to set up your Company Settings screen within the Vidible platform.
Click 'OK' in the OAuth Client screen. The Credentials OAuth 2.0 Client IDs screen is displayed.
Stage II - Creating a YouTube Refresh Token
To create a YouTube Refresh Token, perform the following steps:
Go to https://developers.google.com/oauthplayground/ and login using your Google Credentials.
Click on (the 'Configuration' menu). A configuration drop down is displayed.
Select the 'Use your own OAuth credentials' check box. The OAuth credential fields are displayed.
Enter the OAuth Client ID you created in Stage I into the 'OAuth Client ID' field.
Enter the OAuth Client seceret you created in Stage I into the 'OAuth Client seceret' field.
Click on 'Close' to save your settings.
In the 'Select & authorize APIs' pane, scroll down and click on 'YouTube Data API v3'. A drop down menu will appear displaying all the YouTube Data APIs.
Select all of the YouTube Data APIs by clicking on each one. A check marker should correspond to each API method.
Click on 'Authorize APIs'. A request/response is displayed in the right pane of the screen.
If you haven't signed in yet, select your Google account.
Click on 'Allow' to give your web application client access to the selected APIs.
Click on 'Exchange authorization code for tokens'. The request/response pane is updated and displays a authentication JSON object access token.
Copy your Refresh token displayed between the double quotation marks.
This is the API token you are required to enter in your Company Settings screen within the Vidible platform.
In addition you will need the Client ID and Client Secret obtained previously.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment