1

I am trying to get some products from a user's ebay account, but when I run my code I am only getting a that error "Your application encountered an error. This request is missing required input tag " or "."

<?php

function print_d($array){    echo "<pre>\n";    print_r($array);    echo "</pre>\n";}

$mytoken = "************mytoken************";
$devId   = "************mydevId************";
$appId   = "************myappId************";
$certId  = "************mycertId************";

$wsdl_url = 'http://developer.ebay.com/webservices/latest/ebaySvc.wsdl';

$apiCall = "GetSellerList";

$credentials = array('AppId' => $appId, 'DevID' => $devId, 'AuthCert' => $certId);

$client = new SOAPClient($wsdl_url, array('trace' => 1, 'exceptions' => 0, 'location' => "https://api.ebay.com/wsapi?callname=$apiCall&appid=$appId&siteid=0&version=803&Routing=new"));

$eBayAuth = array('eBayAuthToken' => new SoapVar($mytoken, XSD_STRING, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents'),
                    'Credentials' => new SoapVar ($credentials, SOAP_ENC_OBJECT, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents'));  

$header_body = new SoapVar($eBayAuth, SOAP_ENC_OBJECT);    

$header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents', 'RequesterCredentials', $header_body));                

//set the API call parameters

$params = array('UserID'=>'**sellerid**','DetailLevel'=>'ReturnAll','WarningLevel'=>'High','IncludeWatchCount'=>'true','Pagination'=>array('EntriesPerPage'=>'20','PageNumber'=>'1'),'Version' => '803', 'CreateTimeFrom'=>'2019-07-01T01:01:02.768Z', 'CreateTimeTo'=>'2019-08-22T01:01:02.768Z');  

$request = $client->__soapCall($apiCall, array($params), NULL, $header);  //make the actual API call

print_d($request);

?>

this is what i get :

stdClass Object
(
    [Timestamp] => 2019-08-23T05:54:30.954Z
    [Ack] => Failure
    [Errors] => stdClass Object
        (
            [ShortMessage] => Your application encountered an error.
            [LongMessage] => Your application encountered an error. This request is missing required input tag " or ".
            [ErrorCode] => 34
            [SeverityCode] => Error
            [ErrorParameters] => stdClass Object
                (
                    [Value] =>  or 
                    [ParamID] => 0
                )

            [ErrorClassification] => RequestError
        )

    [Version] => 1119
    [Build] => E1119_CORE_APISELLING_19039141_R1
)```
BIKE.ma
  • 21
  • 6
  • 1
    `This request is missing required input tag " or "` seems pretty clear. I bet if you look at that with something other than a web browser the message will tell you which are missing. – miken32 Aug 23 '19 at 17:56
  • yes thank you i use postman and i found that starttime is the one missing – BIKE.ma Aug 28 '19 at 22:21

2 Answers2

0

thanks i just use postman and i find that the StartTimeFrom and StartTimeTo is the one missing

BIKE.ma
  • 21
  • 6
0

I've got the same error Your application encountered an error. This request is missing required input tag "" or In der Anwendung ist ein Fehler aufgetreten. In dieser Anforderung fehlt der erforderliche Eingabetag "" in German.

First of all if you make request in a browser (99% sure) you have to look at the browser source HTML code (CTRL+U), there is a tag info will be shown that hidden in "pretty" browser view.

In my case I missed up eBay developer API AddItem method Item.PrimaryCategory.CategoryID tag that is not required in docs but required in real.

Igor
  • 755
  • 1
  • 10
  • 22
  • In an Add call, the PrimaryCategory.CategoryID is conditionally required unless the seller successfully uses the ProductListingDetails container to find an eBay catalog product match. Just need to carefully read documentation. – Joe May 21 '22 at 21:22