GOOGLE_CLIENT_ID, 'redirect_uri' => GOOGLE_REDIRECT_URI, 'response_type' => 'code', 'scope' => 'https://www.googleapis.com/auth/calendar.readonly', 'access_type' => 'offline', // Required to get a refresh token 'prompt' => 'consent' // Forces the consent screen to be shown every time ]); header('Location: ' . $auth_url); exit(); ?>