Reputation: 4714
I made the following code that works with the Google Tasks API but it only shows result when its from gmail.com. Any custom Google Apps domain it doesn't work for. Does anyone know the url I should use for the Google Apps Domain Tasks API?
Code:
<?php
session_start();
//load libs
require_once "include/google-api-php-client/src/apiClient.php";
require_once "include/google-api-php-client/src/contrib/apiTasksService.php";
//load api
$apiClient = new apiClient();
$service = new apiTasksService($apiClient);
//authenticate
if (isset($_SESSION['oauth_access_token'])) {
$apiClient->setAccessToken($_SESSION['oauth_access_token']);
} else {
$token = $apiClient->authenticate();
$_SESSION['oauth_access_token'] = $token;
}
//get token
//echo "token: ".$_SESSION['oauth_access_token']."<br />";
//get list
$taskLists = $service->listTasklists();
foreach ($taskLists['items'] as $taskList) {
echo $taskList['title'] . " - " . $taskList['id'] . "<br />";
}
//get list items
echo "<ul>";
$tasks = $service->listTasks('@default');
foreach($tasks['items'] as $task) {
$title = $task['title'];
echo "<li>$title</li>";
}
echo "</ul>▬▬▬";
?>
Upvotes: 0
Views: 1322
Reputation: 3674
This particular issue is being tracked here: https://code.google.com/apis/tasks/forum.html?place=topic%2Fgoogle-tasks-api%2FCVyxwz-Z9Rg%2Fdiscussion
Upvotes: 1
Reputation: 694
I am using gafyd and it works for me. Has your domain migrated to the new system yet?
Upvotes: 0