I'm trying to use the php dropbox sdk, but i got these error
Uncaught exception 'OAuthException' with message 'making the request failed (Peer certificate cannot be authenticated with known CA certificates)' in C:\xampp\htdocs\mydropbox\Dropbox\OAuth\PHP.php:126 Stack trace: #0 C:\xampp\htdocs\mydropbox\Dropbox\OAuth\PHP.php(126): OAuth->getRequestToken('https://api.dro...') #1 C:\xampp\htdocs\mydropbox\index.php(18): Dropbox_OAuth_PHP->getRequestToken() #2 {main} Next exception 'Dropbox_Exception_RequestToken' with message 'We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.' in C:\xampp\htdocs\mydropbox\Dropbox\OAuth\PHP.php:132 Stack trace: #0 C:\xampp\htdocs\mydropbox\index.php(18): Dropbox_OAuth_PHP->getRequestToken() #1 {main} thrown in C:\xampp\htdocs\mydropbox\Dropbox\OAuth\PHP.php on line 132
I did tried so many times, to use OpenSSL to generate new and follow all the instruction ,but it still giving me this errors.
Refer Source:http://help.discretelogix.com/miscellaneous/installing-self-signed-ssl-certificate-on-wamp-server.htm
I found a github that do not use the CA certification, or maybe it's already taken care for me.
https://github.com/BenTheDesigner/Dropbox
it's working well for me.
Related
Fatal error: Uncaught PayPalHttp\HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"} in /home/smmtopse/public_html/vendor/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php:224
Stack trace:
#0 /home/smmtopse/public_html/vendor/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php(107): PayPalHttp\HttpClient->parseResponse(Object(PayPalHttp\Curl))
#1 /home/smmtopse/public_html/vendor/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AuthorizationInjector.php(40): PayPalHttp\HttpClient->execute(Object(PayPalCheckoutSdk\Core\AccessTokenRequest))
#2 /home/smmtopse/public_html/vendor/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AuthorizationInjector.php(32): PayPalCheckoutSdk\Core\AuthorizationInjector->fetchAccessToken()
#3 /home/smmtopse/public_html/vendor/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php(71): PayPalCheckoutSdk\Core\AuthorizationInjector->inject(Object(PayPalCheckoutSdk\Orders\OrdersCreateRequest))
#4 /home/smmtopse/public_html/app/controller/addfunds.php(189): PayP in /home/smmtopse/public_html/vendor/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php on line 224
There are exactly two possible reasons for an invalid_client error when attempting to obtain an access_token.
You are using or transmitting wrong REST App API credentials. Obtain a new clientid and secret from the "sandbox" or "live' tab of PayPal Developer.
You are using sandbox credential in live mode, or live credentials in sandbox mode. The two environments are completely separate, and a clientid+secret from one will never work in the other.
i have to use google api in my project using php
the project : using google search engine and gathering urls and their source pages
i downloaded google api php client and i followed what ever is written here
https://code.google.com/p/google-api-php-client/
after running i ge this error:
Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/plus/v1/people/me/activities/public?key=[REDACTED]: (403) Access Not Configured' in C:\xampp\htdocs\google-api-php-client\src\io\Google_REST.php:66 Stack trace: #0 C:\xampp\htdocs\google-api-php-client\src\io\Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 C:\xampp\htdocs\google-api-php-client\src\service\Google_ServiceResource.php(186): Google_REST::execute(Object(Google_HttpRequest)) #2 C:\xampp\htdocs\google-api-php-client\src\contrib\Google_PlusService.php(58): Google_ServiceResource->__call('list', Array) #3 C:\xampp\htdocs\googleapitest.php(31): Google_ActivitiesServiceResource->listActivities('me', 'public') #4 {main} thrown in C:\xampp\htdocs\google-api-php-client\src\io\Google_REST.php on line 66
i am completely confused and don't know what to do
That error often means you're not matching your access requirements in the API console - i.e. if you have IP or referrer restrictions configured.
Just remove your developer key and add the scope
'www.googleapis.com/auth/userinfo.email',
'www.googleapis.com/auth/userinfo.profile',
'www.googleapis.com/auth/plus.login',
'www.googleapis.com/auth/plus.me'));
I'm testing the OAuth2 service with google-api-php-client library to access UserInfo of logged users with their Google account. The code is taken from examples/userinfo/index.php with little change to cope with my host. When running the example, it passed through Google login form. When it came back to my site, an exception thrown as following.
Fatal error: Uncaught exception 'apiIOException' with message 'HTTP Error: (0) couldn't connect to host' in /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiCurlIO.php:120
Stack trace:
#0 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiCurlIO.php(46): apiCurlIO->makeRequest(Object(apiHttpRequest))
#1 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiREST.php(55): apiCurlIO->authenticatedRequest(Object(apiHttpRequest))
#2 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/service/apiServiceResource.php(151): apiREST::execute(Object(apiServiceRequest))
#3 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/contrib/apiPlusService.php(207): apiServiceResource->__call('get', Array)
#4 /home/ztbmwjhd/public_html/apis/at/googleplus/google-plus-access.php(40): PeopleServiceResource->get('me')
#5 /home/ztbmwjhd/public_html/apis/at/googleplus/index.php(2): include_once('/home/ztbmwjhd/...')
#6 {main}
throw in /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiCurlIO.php on line 120
Thank you for your help
The error "HTTP Error: (0) couldn't connect to host" typically means theres a problem between your server and google. Are you connecting through a proxy?
Also, try to run "curl https://www.googleapis.com/discovery/v1/apis" from your command line.
I am newer to the Google Plus Api, but I have followed each and every rule to integrate G-Plus API in my WEB. But every time I get stuck at the issue:
Fatal error: Uncaught exception 'apiAuthException' with message 'Error refreshing the OAuth2 token, message: ''' in C:\AppServ\www\googleplus-source\google-api-php-client\src\auth\apiOAuth2.php:203
Stack trace:
#0 C:\AppServ\www\googleplus-source\google-api-php-client\src\io\apiCurlIO.php(51): apiOAuth2->sign(Object(apiHttpRequest))
#1 C:\AppServ\www\googleplus-source\google-api-php-client\src\io\apiREST.php(55): apiCurlIO->authenticatedRequest(Object(apiHttpRequest))
#2 C:\AppServ\www\googleplus-source\google-api-php-client\src\service\apiServiceResource.php(148): apiREST::execute(Object(apiServiceRequest))
#3 C:\AppServ\www\googleplus-source\google-api-php-client\src\contrib\apiPlusService.php(204): apiServiceResource->__call('get', Array)
#4 C:\AppServ\www\googleplus-source\google-plus-access.php(40): PeopleServiceResource->get('me')
#5 C:\AppServ\www\googleplus-source\index.php(2): include_once('C:\AppServ\www\...')
#6 {main} thrown in C:\AppServ\www\googleplus-source\google-api-php-client\src\auth\apiOAuth2.php on line 203
What could be the reason for this error?
What could be the reason for this error?
The reason for this error (a Fatal error) is given in the error message: Uncaught exception. That means an exceptionÂDocs has been thrown and was not caught. This results in a fatal error.
Most likely in your case, the root cause of the problem highlighted in the exception message is misconfiguration and/or wrong API usage. As you have not posted any code in your question, you should read the API documentation first and double check your usage of the API and it's configuration.
I am gelling following error while trying to read file content which is residing in a subfolder rather than a parent folder.
Fatal error: Uncaught exception 'Exception' with message 'Invalid
signature. Expected signature base string:
GET&https%3A%2F%2Fapi-content.dropbox.com%2F1%2Ffiles%2Fdropbox%2FProjects%2FMAC%2520Error.rtf&oauth_consumer_key%3Dbdagb07uu6zq827%26oauth_nonce%3D46d063d5815a0972d63cf72359c0349f%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1324449973%26oauth_token%3D7f2cr9kppqo2hxz%26oauth_version%3D1.0
(Status Code: 403)' in
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/OAuth/Consumer/Curl.php:133
Stack trace: #0
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/API.php(109):
Dropbox\OAuth\Consumer\Curl->fetch('GET', 'https://api-con...',
'files/dropbox/P...', Array) #1
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/check.php(21):
Dropbox\API->getFile('Projects/MAC Er...') #2 {main} thrown in
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/OAuth/Consumer/Curl.php
on line 133
I am using Ben's Dropbox Library for php
https://github.com/BenTheDesigner/Dropbox
Thanks
If you are looking for a simple PHP-API you can find one here:
https://github.com/hawaiianchimp/Dropbox-PHP-API/
This is the message thats returned when a OAuth request is signed incorrectly. This is likely the fault of the library you're using. At first glance, it looks like it may be encoding the name of your "MAC Error.rtf" file incorrectly. Checkout the PHP SDK dropbox mentions on its website as an alternative and raise this issue with the library's owner.
The code that generates this would help too.