Answer the question
In order to leave comments, you need to log in
Why does the WebAPI doMyContact method return an empty table?
allegro.pl/webapi/documentation.php/show/id,1177
My code:
$contacts = $client->call(
'doMyContact',
array(
array(
'sessionHandle' => $session['sessionHandlePart'],
'auctionIdList' => array(/*auction id*/),
'offset' => 0
)
)
);
if (isset($contacts['faultcode']) && isset($contacts)) {
echo 'fault code: ' . $contacts['faultcode'] . ' <br/>';
echo 'fault string: ' . $contacts['faultstring'] . ' <br/>';
} else if (isset($contacts)) {
var_dump($contacts); //array(1) { ["mycontactList"]=> string(0) "" } !!!
}
if (isset($contacts['mycontactList']['item'])) {
foreach ($contacts['mycontactList']['item'] as $row) {
$myContacts[$row['contact-user-id']] = $row;
}
}
Answer the question
In order to leave comments, you need to log in
Based on this unanswered post from a year ago, the doMyContact method simply doesn't work. And this one works:
$contacts = $client->call(
'doGetPostBuyData',
array(
'parameters' => array(
'sessionHandle' => $session['sessionHandlePart'],
'itemsArray' => array(
'item' => array(/*auction id*/)
)
)
)
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question