php-echonest-api icon indicating copy to clipboard operation
php-echonest-api copied to clipboard

api id not recognised?

Open dorienh opened this issue 11 years ago • 1 comments

Hello,

Thanks for your assistance before. I have been trying to get track info from an mp3 at a certain location, which I upload first. But I get the following error code (my ID is correct btw). Perhaps it makes more sense to you?

Fatal error: Uncaught exception 'EchoNest_HttpClient_Exception' with message '1|Invalid key: Unknown' in /home/suneesto/addons/drupalfun.com/dance/php-echonest-api-master/lib/EchoNest/HttpClient.php:110 Stack trace: #0 /home/suneesto/addons/drupalfun.com/dance/php-echonest-api-master/lib/EchoNest/HttpClient.php(78): EchoNest_HttpClient->request('track/upload', Array, 'POST', Array) #1 /home/suneesto/addons/drupalfun.com/dance/php-echonest-api-master/lib/EchoNest/Client.php(97): EchoNest_HttpClient->post('track/upload', Array, Array) #2 /home/suneesto/addons/drupalfun.com/dance/php-echonest-api-master/lib/EchoNest/Api/Track.php(105): EchoNest_Client->post('track/upload', Array) #3 /home/suneesto/addons/drupalfun.com/dance/uploader.php(24): EchoNest_Api_Track->upload('http://drupalfu...', true, 'mp3', NULL, NULL) #4 {main} thrown in /home/suneesto/addons/drupalfun.com/dance/php-echonest-api-master/lib/EchoNest/HttpClient.php on line 110

This is my code:

require_once 'php-echonest-api-master/lib/EchoNest/Autoloader.php'; EchoNest_Autoloader::register(); $echonest = new EchoNest_Client(); $apikey = 'XXXmycorrectkey'; $echonest->authenticate($apiKey);

$url='http://drupalfun.com/dance/fastcar.mp3'; $trackApi = $echonest->getTrackApi()->upload($url, $wait = true, $filetype = mp3, $bucket = null, $track = null);

dorienh avatar Jun 19 '13 15:06 dorienh

It looks like this is coming from the APIs themselves. I would check with the EchoNest API documentation to find out more.

bshaffer avatar Jun 23 '13 23:06 bshaffer