title: Opencart 2.2.0.0: You don't have permission to access API
body: <p>I'm using Apache:2.4.7; PHP: 5.4.24; Opencart: 2.2.0.0; 
  I've created the API with the name => REST and generated a API key.</p>
  
  <p><a href="https://i.stack.imgur.com/riZ5l.png" rel="nofollow">IMAGE API page of admin opencart</a></p>
  
  <p>I do the login in this API this way:</p>
  
  <pre><code>$url = "http://localhost/upload/index.php?route=api/login";
  $params = array('key=dpUFrufwZdbctqKaFckZz7WudebaAQO7orP6Y3QtpxTsbOyjNjpQZgIgAtp4SQVJWSfvpj2Acpis0E382EO3PhRcSMSJ6MpjV8EDXlWAtEC7aD3aGUou2yCL7ETpDARiIpzgy7auG2hhllIRjeUtXsiVUu6ENlJ7fBtIKvomjpTeaMXpIVklWx5CyxwIIGUA5CoYLGD4qPFvr6OAqDxJvhktMOjhj4DlKTvkTp0WzuoRBfRCDt8N4XIHMxbTIH1u'
      );
  
  $parameters = implode('&amp;', $params);
  
  $ch = curl_init();
  curl_setopt($ch,CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
  //curl_setopt($ch,CURLOPT_POST, 1);
  curl_setopt($ch,CURLOPT_POST, 1);
  curl_setopt($ch,CURLOPT_POSTFIELDS, $parameters);
  
  //execute post
  set_time_limit(120);
  $result = curl_exec($ch);
  
  //close connection
  curl_close($ch);
  
  print_r($result);
  </code></pre>
  
  <p>It ruturns me a TOKEN, so I can use this token to access others link in this REST. But, when I use the TOKEN like this:</p>
  
  <pre><code>$url = "http://localhost/upload/index.php?route=api/cart/products";
  $params = array('token=bxXXgBX3NAue7dDnTC7pzQxf2qLZX8fB',
      );
  
  $parameters = implode('&amp;', $params);
  
  $ch = curl_init();
  curl_setopt($ch,CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
  //curl_setopt($ch,CURLOPT_POST, 1);
  curl_setopt($ch,CURLOPT_POST, 1);
  curl_setopt($ch,CURLOPT_POSTFIELDS, $parameters);
  
  //execute post
  set_time_limit(120);
  $result = curl_exec($ch);
  
  //close connection
  curl_close($ch);
  
  print_r($result);
  </code></pre>
  
  <p>It returns me a error like:</p>
  
  <p><code>{"error": {"warning":"warning: you don't have permission to access API!"}}</code></p>
  
  <p>Could anybody help me?</p>
  
  <p>What I've already tried:</p>
  
  <pre><code>- Permission for all user (user group)
  - Pay atention to domain and sub domain
  - Recreate the API and regenerate the API Key
  </code></pre>