In order to allow your platform users to publish their videos on YouTube, you need to get YouTube API credentials.
Important: the Admin needs to create two different sets of credentials:
– API key
The first step in getting the YouTube API credentials is creating the API for your application into your Google account. You can do that, clicking on the following link: http://code.google.com/apis/console/.
After you log into your Goggle account, start creating a new project:
1. Click here to create a new API Project
On Google API Projects page, you have the possibility to add a new project or edit an existing one:
1. Enter here the name of the project
2. Click here to edit the project ID
3. Click here to save the project
After the project is created you will see it on the list of projects from your account:
To get the API of the project, click on project name.
You will land on the Overview page, from here you will have to enable the YouTube Data API, as shown on the following image:
On the page that opens you will have to click on Enable button in order to enable the YouTube Data API, as shown on the following image:
After that you will have to navigate to Credentials tab:
From the Credentials page click on Create credentials button and select the QAuth client ID option:
1. Click here to select the API credential type
2. Click here to create an QAuth client ID
Then you will have to create a Web application:
To create an OAuth client ID, you must first set a product name on the consent screen:
Click on Configure consent screen button:
1. Enter here the name of the product – this is the name that will be shown to users
2. Enter the homepage URL – this is the URL of your website
3. Enter here the URL of your product logo (this is optional)
4. Click here to save the QAth consent screen
Once you created the consent screen, you will be able to set the application type:
1. Insert here the name of the web client
2. Enter here the callback URL – the one that our team provided you on the ticket system
3. Click here to create the Client ID
Example of redirect URLs:
- http://yoursite.com/services/youtube/oauth2callback.php
- http://testarea.yoursite.com/services/youtube/oauth2callback.php
where “yoursite.com” with your site domain name
Once the client ID is created you can view the QAuth client ID and secret:
1. Here you can view the client ID
2. Here you can see the client secret ID
3. Click here to close the overlay window
After you created the QAuth key, you need to create an API key:
1. Click here to select the API credential type
2. Click here to create an API key
The next step is to select the Server key:
An overlay window will be displayed and you can view the API key:
Copy the codes from the API access page into your website Site Settings page:
1. Paste here client ID code
2. Paste here secret client ID code
3. Paste here developer API key
4. Click here to save the settings
Once these settings done, users will be able to upload videos to YouTube directly from their user dashboard account.