Added GMAIL_SEND scope request for Google API. Details in README.

This commit is contained in:
Markus Birth 2016-08-04 15:40:19 +02:00
parent 320c58be50
commit f237e37a28
2 changed files with 5 additions and 1 deletions

View File

@ -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
============

View File

@ -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();
}