Skip directly to content

YouTube Data API v3 : How to get $DEVELOPER_KEY

on Wed, 12/25/2013 - 22:43

In the PHP example code for Google's YouTube Data API v3 there is a variable that calls for a developer key. Without this key the example code won't work, but getting that key is not obvious due to recent changes in the cloud console interface. Here's how you get it.

First, the name of the key that you're looking for isn't "developer key" anymore, it's an "API key" for "Public Access". This is opposed to the OAuth credentials. If you want to do something that requires authenticated access, you'll need the OAuth credentials. For searching and listing videos, you don't.

In the Google cloud console, to to APIs & auth > Credentials. In the "Public API Access" section, click "CREATE NEW KEY". This is what it should look like:

[[{"type":"media","view_mode":"media_crop","fid":"226","attributes":{"alt":"","class":"media-image","id":"media_crop_8028238657861","media_crop_h":"0","media_crop_image_style":"600-wide","media_crop_instance":"91","media_crop_rotate":"0","media_crop_scale_h":"0","media_crop_scale_w":"0","media_crop_w":"0","media_crop_x":"0","media_crop_y":"0","typeof":"foaf:Image"}}]]

For the "Edit allowed IPs", I used Google to find my public IP address since I'm developing locally and get a new IP from my ISP. When I deploy this onto the web I'll have to update the allowed IPs.