From this snippet of code using the Oauth2 access_token:
$acsToken = json_decode($client->getAccessToken())->{'access_token'};
$arrHeader = array('Content-Type'=>'application/json', 'Authorization'=>'Bearer '.$acsToken);
$ch = curl_init( 'https://www.googleapis.com/fusiontables/v1/query?sql=SELECT%20UserID%20FROM%201DGQPfPkjgcNVUc3ndplxNBlET9TlwoVcQw5_jVA');
curl_setopt( $ch, CURLOPT_HTTPHEADER, $arrHeader);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
if($response === false){
echo 'Curl error: ' . curl_error($ch);
} else {
echo "<br /> response: ".$response;
}
This is what is returned.
response: { "error": { "errors": [ { "domain": "usageLimits", "reason": "dailyLimitExceededUnreg", "message": "Daily Limit Exceeded. Please sign up", "extendedHelp": "https://code.google.com/apis/console" } ], "code": 403, "message": "Daily Limit Exceeded. Please sign up" } }
According to the api Console I have had 50 requests in the past 28 days. The maximum limit for fusion tables is 25,000 per day. so I shouldn't be over the limit.
I have not use cURL before. Is my cURL request malformed?