[ic] eBay API help needed

Grant listbox at email.com
Tue Dec 16 12:24:17 EST 2003


> Hello,
> 
> I am not sure what this board is for. But I did see some questions about 
> the eBay API and since I have some, I thought I would post here.
> 
> I have tried several examples from 100 eBay Hacks and some code samples 
> posted on the ebay website, but can't get them to work. I always get the 
> following error.
> 
> 500 Can't connect to api-test.ebay.com:443 (Bad protocol 'tcp')
> 
> Can someone help?? I am including some code below -- I have blanked out
> userids and passwords.
> 
> Thanks,
> 
> Saleem
> 
> #!/usr/bin/perl
> 
> use strict;
> use LWP::UserAgent;
> use HTTP::Request;
> use HTTP::Headers;
> 
> my $objUserAgent = LWP::UserAgent->new;
> my $objHeader = HTTP::Headers->new;
> 
> $objHeader->push_header('X-EBAY-API-COMPATIBILITY-LEVEL' => '245');
> $objHeader->push_header('X-EBAY-API-SESSION-CERTIFICATE' => 
> '[DEVID];[APPID];[CERTID]');
> 
> my $request = "<?xml version='1.0' encoding='iso-8859-1'?>
> 				<request>
> 				<RequestUserId>[USERID]</RequestUserId>
> 				
> <RequestPassword>[PASSWORD]</RequestPassword>
> 				<ErrorLevel>1</ErrorLevel>
> 				<DetailLevel>0</DetailLevel>
> 				<Verb>GeteBayOfficialTime</Verb>
> 				</request>";
> 	
> my $objRequest = HTTP::Request->new("POST", 
> 'https://api-test.ebay.com/aw-cgi/api.dll', $objHeader, $request);
> my $objResponse = $objUserAgent->request($objRequest);
> 
> if (!$objResponse->is_error)
> {
> 	print $objResponse->content;
> }
> else
> {
> 	print $objResponse->error_as_HTML;
> }

Are you using Interchange?

- Grant


More information about the interchange-users mailing list