Alright... I've chased the trail around the internet for this one, and I'm coming up with nothing.
Trying to use the PHP Vimeo API to upload videos. I have upload permission on my app, I've got tokens, and client id and secret stuff all set up, and a small myriad of other things that I've put together to make everything work... and... now I'm getting this and I have no idea what to do with it :P
PHP Fatal error: Uncaught exception 'Vimeo\Exceptions\VimeoRequestException' with message 'Unable to complete request.[Couldn't resolve host '1511623453.cloud.vimeo.com']' in /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php:154 Stack trace:
#0 /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php(396): Vimeo\Vimeo->_request('https://1511623...', Array)
#1 /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php(320): Vimeo\Vimeo->perform_upload('users/test/outp...', Array)
#2 /home/theo/software-dev/vim_test.php(20): Vimeo\Vimeo->upload('users/test/outp...', false)
#3 {main} thrown in /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php on line 154
The upload script is super simple, and I doubt to be the source of the error, though here it is:
1 <?php
2 include("./config/vim.php");
3 require("./classes/vimeo/autoload.php");
4
5 $lib = new \Vimeo\Vimeo($client_id, $client_secret);
6
7 $lib->setToken($token);
8
9 $response = $lib->upload('users/test/output.mp4', false);
Any suggestions or thoughts?
Thanks!
Try and close all the browers on the computer or phone then make sure your api has the lastet version.
Related
Hi I hope everybody is doing well
I am trying to add leads to Zoho CRM using API v2, now for that, if the user already there I will update its record if a user is not there I will create a new record into it, right now I am finding out a way to handle the exception error when there is not any user in CRM it displays this line
Fatal error: Uncaught zcrmsdk\crm\exception\ZCRMException Caused by:'No Content' in C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\BulkAPIResponse.php(61) #0 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\CommonAPIResponse.php(76): zcrmsdk\crm\api\response\BulkAPIResponse->handleForFaultyResponses() #1 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\CommonAPIResponse.php(67): zcrmsdk\crm\api\response\CommonAPIResponse->processResponse() #2 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\BulkAPIResponse.php(47): zcrmsdk\crm\api\response\CommonAPIResponse->__construct('HTTP/1.1 204 \r\n...', 204) #3 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\APIRequest.php(148): zcrmsdk\crm\api\response\BulkAPIResponse->__construct('HTTP/1.1 204 \r\n...', 204) #4 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\handler\MassEntityAPIHandler.php(327): zcrmsdk\crm\api\APIRequest->getBulkAPIResponse() #5 C:\xampp\htdocs\crmint2\vendor\zoh in C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\BulkAPIResponse.php on line 61
Now I have tried try and catch statement as well but it stucks here and crashes the application, I am looking forward to someone who had gone through this and was successful in implementing it
I'm trying to download order details from a woocommerce API for easy display and update purpose.
I tested the entire setup locally with two separate web addresses. One for test woocommerce install [copy from production site] and one for order display webpage.
Everything works fine locally. But when I connect the order display to production. It downloads all orders and display according to my design, But when I try to update an order it throws an exception.
After googling for a while found that this could be caused by timezone differences, checked time on both server and my pc it was spot on.
Anyway I changed
php timezone to correct one on both server and pc php.ini and restarted httpd
changed server linux timezone and rebooted the server.
Still, I get following only in production[hosted in AWS]. In no expert on php, but got some programming knowledge. Anyone who can point me to correct direction?
Fatal error: Uncaught exception
'Automattic\WooCommerce\HttpClient\HttpClientException' with message 'Error:
Invalid signature - provided signature does not match.
[woocommerce_rest_authentication_error]' in
C:\xampp\htdocs\orderdash\vendor\automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.php:348 Stack trace: #0
C:\xampp\htdocs\orderdash\vendor\automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.php(378): Automattic\WooCommerce\HttpClient\HttpClient->lookForErrors(Object(stdClass)) #1
C:\xampp\htdocs\orderdash\vendor\automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.php(414): Automattic\WooCommerce\HttpClient\HttpClient->processResponse() #2
C:\xampp\htdocs\orderdash\vendor\automattic\woocommerce\src\WooCommerce\Client.php(69): Automattic\WooCommerce\HttpClient\HttpClient->request('orders/544', 'PUT', Array) #3
C:\xampp\htdocs\orderdash\index.php(149): Automattic\WooCommerce\Client->put('orders/544', Array) #4 {main} thrown in
C:\xampp\htdocs\orderdash\vendor\automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.php on line 348
Connection
$woocommerce = new Client('http://example.com/',
'ck_321cad474478e1275',
'cs_76f8566e67cd7aa31',
['wp_api' => true, 'version' => 'wc/v1']);
Download orders
$data = ['status' => 'processing'];
$order_details = $woocommerce->get('orders',$data);
update data [use a button submit]
$update_order_id = $_POST['orderid'];
$st = ['status' => 'completed'];
$woocommerce->put('orders/'. $update_order_id, $st);
I have sign in with google enable in my website it is working fine since last 3-4 month but from yesterday it start giving me following error on every 4-5 minuites
Fatal error: Uncaught exception 'Google_Auth_Exception' with message
'Error fetching OAuth2 access token, message: 'invalid_grant: Code was
already redeemed.'' in
F:\ServerFolders\Projects\domain.com\src\Google\Client.php(131):
Google_Auth_OAuth2->authenticate('4/8hj0saqecCytQ...', false) #1
F:\ServerFolders\Projects\domain.com\application\libraries\NV_gmail.php(105):
Google_Client->authenticate('4/8hj0saqecCytQ...') #2
F:\ServerFolders\Projects\domain.com\application\libraries\layout.php(51):
NV_gmail->login() #3
F:\ServerFolders\Projects\tl-l.com\application\controllers\dashboard.php(19):
layout->header() #4 [internal function]: dashboard->index() #5
F:\ServerFolders\Projects\domain.com\system\core\CodeIgniter.php(359):
call_user_func_array(Array, Array) #6
F:\ServerFolders\Projects\domain.com\index.php(202):
require_once('F:\ServerFolder...') #7 {main} thrown in
F:\ServerFolders\Projects\domain.com\src\Google\Auth\OAuth2.php on
line 126
And shows blank page .
When the user clicks authenticate you are given an authentication code. You take this code and exchange it for your access token and refresh token.
'invalid_grant: Code was already redeemed
Means that you are taking an authentication code that has already been used and trying to get another access token / refresh token for it.
If it has worked for the last 4 months my opinion is that someone changed something in your code and broke it.
Change
curl_setopt($curl, CURLOPT_SSLVERSION, 3);
to
//curl_setopt($curl, CURLOPT_SSLVERSION, 3);
from curl.php according to github.com/google/google-api-php-client/issues/639 and now working fine
I'm trying to use this api http://code.google.com/p/android-market-api/. I would like to get some that from play store. like App name, description, screenshots and download rating(total downloads, week downloads....)
I'm using the php version. I uploaded all the code to my personal server. www.example.com/test/.
Should I configure anything else in addition of local.php, email and password fields? I only did that.
I have this error:
Uncaught exception 'Exception' with message 'HTTP request returned code 400' in /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php:212 Stack trace:
#0 /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php(160): MarketSession->executeRawHttpQuery('??????DQAAAMkAA...')
#1 /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php(147): MarketSession->executeProtobuf(Object(Request))
#2 /homepages/31/d229886149/htdocs/carlos/test/examples/test_categories.php(15): MarketSession->execute(Object(Request_RequestGroup))
#3 {main} thrown in /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php
on line 212
Thank you.
After that I would like to implement it with codeIgniter
try with '0123456789123456' as an ANDROID_DEVICEID
define('GOOGLE_EMAIL','someone#gmail.com');
define('GOOGLE_PASSWD','SomePassword');
define('ANDROID_DEVICEID','0123456789123456');
Hi i am trying to use soap to get results from amazon, and i havent tried this before so i was trying some sample code. The problem is i get an error.
the code is this:
<?php
#Use the NuSOAP php library
//require_once('lib/nusoap.php');
$params->AWSAccessKeyId = AMAZON_API_KEY;
$params->Request->SearchIndex = 'Books';
$params->Request->Keywords = 'php5';
$amazon = new SoapClient('http://webservices.amazon.com/AWSECommerceService /AWSECommerceService.wsdl');
$result = $amazon->itemSearch($params);
echo $result;
?>
and this is the error i get when i run it. thanx for your time
Fatal error: Uncaught SoapFault exception: [aws:Client.MissingParameter] The request must contain the parameter Signature. in C:\wamp\www\amasearch.php:11 Stack trace: #0 [internal function]: SoapClient->__call('itemSearch', Array) #1 C:\wamp\www\amasearch.php(11): SoapClient->itemSearch(Object(stdClass)) #2 {main} thrown in C:\wamp\www\amasearch.php on line 11
Weird. The WSDL doesn't have a signature parameter for any type. BUT, I found this in Amazon dev forums. Recommend you to check it out (also, if you develop using amazon services, keep that resource at hand
https://forums.aws.amazon.com/ann.jspa?annID=483
Looks like security gates for services are now taller and bigger, mate
EDIT: This question link to some example in C#. Maybe it can help you out Amazon (AWS) - The request must contain the parameter Signature
And this is an example in AWS forums with PHP https://forums.aws.amazon.com/message.jspa?messageID=149715