diff --git a/README.md b/README.md index fb865b6..6c4e11f 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,12 @@ Fake Reservation System Allows you to send mails to your Google Inbox that trigger Google Now cards. -To set up a server for yourself, you have to get an API key from +To set up a server for yourself, you have to get an OAuth client ID from https://console.developers.google.com/apis/, download the `client_secret.json` and put it into the root directory. +Also make sure to enable the *Google+ API* and the *Gmail API*. + Installation ============ diff --git a/lib/Frs/SessionManager.php b/lib/Frs/SessionManager.php index 2dc8553..bbba7c7 100644 --- a/lib/Frs/SessionManager.php +++ b/lib/Frs/SessionManager.php @@ -11,8 +11,10 @@ class SessionManager { $this->googleAuthValid = false; $this->client = new \Google_Client(); + $this->client->setApplicationName('Fake Reservation System'); $this->client->setAuthConfigFile('client_secret.json'); $this->client->addScope(\Google_Service_Oauth2::USERINFO_EMAIL); + $this->client->addScope(\Google_Service_Gmail::GMAIL_SEND); session_start(); }