Google_ServiceException while using Mirror api php sdk - php

I'm getting errors while running Google Glass quick starter PHP project using Mirror API. I've seen a similar question in the forum but in my case i've enabled the Mirror api in the Google API console. We are working in a group using a new Gmail account(that aptly describes our group) which has been tied up to our Glass very recently.
In the error log it says:
Uncaught exception 'Google_ServiceException' with message 'Error calling GET
https://www.googleapis.com/mirror/v1/timeline?maxResults=3&key=xxxxxxxxxxx: (403)
Access Not Configured'
Any help in this regard would be very much appreciated.
Thanking the experts in advance.
The complete error log:
PHP Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/mirror/v1/timeline?maxResults=3&key=xxxxxxxxxxxxxx: (403) Access Not Configured' in /var/www/mirror-quickstart-php/google-api-php-client/src/io/Google_REST.php:66\nStack trace:\n#0 /var/www/mirror-quickstart-php/google-api-php-client/src/io/Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest))\n#1 /var/www/mirror-quickstart-php/google-api-php-client/src/service/Google_ServiceResource.php(186): Google_REST::execute(Object(Google_HttpRequest))\n#2 /var/www/mirror-quickstart-php/google-api-php-client/src/contrib/Google_MirrorService.php(434): Google_ServiceResource->__call('list', Array)\n#3 /var/www/mirror-quickstart-php/index.php(142): google_TimelineServiceResource->listTimeline(Array)\n#4 {main}\n thrown in /var/www/mirror-quickstart-php/google-api-php-client/src/io/Google_REST.php on line 66
And in the index.php line 142 shows:
//Load cool stuff to show them.
$timeline = $mirror_service->timeline->listTimeline(array('maxResults'=>'3'));

Related

Azure PHP SDK 401 unauthorised error

I'm trying to get azure media services job details using Azure PHP SDK. I could able to do this previously. But now it shows some error below.
Fatal error: Uncaught exception
'WindowsAzure\Common\ServiceException' with message 'Fail: Code: 401
Value: Unauthorized details (if any): .' in
D:\mystack\htdocs\at\sites\all\modules\custom\ams\vendor\microsoft\windowsazure\WindowsAzure\Common\Internal\Http\HttpClient.php:382
Stack trace: 0
D:\mystack\htdocs\at\sites\all\modules\custom\ams\vendor\microsoft\windowsazure\WindowsAzure\Common\Internal\Http\HttpClient.php(276):
WindowsAzure\Common\Internal\Http\HttpClient::throwIfError(401,
'Unauthorized', '', Array) 1
D:\mystack\htdocs\at\sites\all\modules\custom\ams\vendor\microsoft\windowsazure\WindowsAzure\Common\Internal\RestProxy.php(141):
WindowsAzure\Common\Internal\Http\HttpClient->send(Array,
Object(WindowsAzure\Common\Internal\Http\Url)) 2
D:\mystack\htdocs\at\sites\all\modules\custom\ams\vendor\microsoft\windowsazure\WindowsAzure\Common\Internal\ServiceRestProxy.php(86):
WindowsAzure\Common\Internal\RestProxy->sendContext(Object(WindowsAzure\Common\Internal\Http\HttpCallContext))
3 D:\mystack\htdocs\at\sites\a in
D:\mystack\htdocs\at\sites\all\modules\custom\ams\vendor\microsoft\windowsazure\WindowsAzure\Common\Internal\Http\HttpClient.php
on line 382
Any problem with azure rest service?

Fatal error while executing cron job in Google AppEngine

I want to execute a cron job in GAE but i got this error.I want to use app engine services without logging in to my email.
PHP Fatal error: Uncaught exception 'Google_AuthException' with message 'Could not json decode the token' in /base/data/home/apps/s~gcdc2013-cloud-daybook/1.371004284914522718/google-api-php-client/src/auth/Google_OAuth2.php:162
Stack trace:
#0 /base/data/home/apps/s~gcdc2013-cloud-daybook/1.371004284914522718/google-api-php-client/src/Google_Client.php(170): Google_OAuth2->setAccessToken(NULL)
Does it work when you're not running it from cron?
It looks like your either missing the service account key, or you're not loading it properly.

Turning off Facebook API errors

Is there a way to disable the Facebook PHP API from printing certain errors (disable them per api call maybe?) as they occur such as
Fatal error: Uncaught GraphMethodException: Unsupported delete request. thrown in [URL] on line [LINE]
Thank you all!

PHP Shopify Fatal error: Uncaught exception 'ShopifyClientCurlException' with message 'SSL connection timeout'

Just starting out with shopfiy and this is my first ever stack post!
I'm trying to setup Sandeeps Shetty's "Simple Shopify API client in PHP" found here:
https://github.com/sandeepshetty/shopify_client
I keep seeing the following error in my logs (i've removed full paths and api creds):
PHP Fatal error: Uncaught exception 'ShopifyClientCurlException' with
message 'SSL connection timeout' in
shopify_client/shopify_client.php:67\nStack trace:\n#0
shopwriters/shopify_client/shopify_client.php(36): shopify_api('POST',
'https://baumbac...', NULL, Array)\n#1
/home/matt/public_html/projects/shopwriters/public_html/index.php(20):
oauth_access_token('shopurl...', 'xxx...', 'xxx...', 'xxx...')\n#2
{main}\n thrown in shopify_client/shopify_client.php on line 67
Anyone had a similar issue? I'm on Ubuntu 12.04.
The fix for this problem was adding:
CURLOPT_SSLVERSION => 3
to wcurl.php in the $default_curl_opts array.
Thanks to all who helped out!

Bosh Error Message in Debian server

HI, I have a debian server.
I am using xmpphp library for bot development.
When i create a bot using xmpp file its working fine but when i try to use bosh it generates a fatal error.
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /var/www/testlib/XMPPHP/BOSH.php:75
Stack trace:
0 /var/www/testlib/XMPPHP/BOSH.php(75): SimpleXMLElement->__construct('')
1 /var/www/testlib/index.php(14): XMPPHP_BOSH->connect('myserver')
2 {main}
thrown in /var/www/testlib/XMPPHP/BOSH.php on line 75
Please help me on this
Thanks
Not sure but could it be related to this known bug:
http://bugs.php.net/bug.php?id=42682

Categories