- Go to http://cloud.google.com/console and log-in
- Activate youtube-data API (APIs & auth -> APIs)
- Register a new app (APIs & auth -> registered apps)
- Name it, select
native
- Write down your
client-id
andclient-secret
- Name it, select
Marks: https://developers.google.com/console/help/new
-
Set $client_id and in
step1_url.php
andstep2_refresh_token.php
-
$ php step1_url.php
and open the url in your browser- Write down the auth code ('code' in
step2_refresh_token.php
).
- Write down the auth code ('code' in
-
Set 'client_secret' and 'code' in
step2_refresh_token.php
-
$ php step2_refresh_token.php
- Write down your refresh token
-
Save your client-id, client-secret and refresh-token
See more info on this thread: http://stackoverflow.com/questions/8257678/google-calendar-api-v3-hardcoded-credentials
See more info about client scret: http://stackoverflow.com/questions/15547019/how-do-i-find-the-googles-oauth-2-0-client-secret-key-for-developing-chrome-ext