ARHU6308401

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. me aparece esto Array ( [body] => stdClass Object ( [message] => Invalid limit and offset values [error] => limits.invalid [status] => 400 [cause] => Array ( ) ) [httpCode] => 400 )
  2. asi esta el codigo <?php $meli = new Meli($appId, $secretKey, isset($_SESSION['access_token']), isset($_SESSION['refresh_token'])); if(isset($_GET['code']) || isset($_SESSION['access_token'])) { if(isset($_GET['code']) && !isset($_SESSION['access_token'])) { try { $user = $meli->authorize($_GET["code"], $redirectURI); // Now we create the sessions with the authenticated user $_SESSION['access_token'] = $user['body']->access_token; $_SESSION['expires_in'] = time() + $user['body']->expires_in; $_SESSION['refresh_token'] = $user['body']->refresh_token; } catch(Exception $e) { echo "Exception: ", $e->getMessage(), "\n"; } } else { if($_SESSION['expires_in'] < time()) { try { // Make the refresh proccess $refresh = $meli->refreshAccessToken(); // Now we create the sessions with the new parameters $_SESSION['access_token'] = $refresh['body']->access_token; $_SESSION['expires_in'] = time() + $refresh['body']->expires_in; $_SESSION['refresh_token'] = $refresh['body']->refresh_token; } catch (Exception $e) { echo "Exception: ", $e->getMessage(), "\n"; } } } $params = array('access_token' => $_SESSION['access_token'],'limit' => '10', 'offset' => 0 ); $user = $meli->get('/users/me', $params); $itemId = 'xxxxxxx'; $item = $meli -> get('/users/'.$itemId.'/items/search',$params); echo "<br>"; echo "<pre>"; print_r($item); echo "<pre>"; } ?>
  3. si estoy pasando el access_token en la variable
  4. $itemId = '1xxxxxxxxx'; $item = $meli -> get('/users/'.$itemId.'/items/search',$params); echo "<br>"; echo "<pre>"; print_r($item); echo "<pre>"; a la hora de mostrar los items me aparece el error 403, por que se da eso?