how to correctly use curl command line with Services module?
You need to send only username and password. Mail is not required.. Please check the documentation here...

$base_url = 'http://localhost/test_endpoint';
$data = array(
  'username' =&gt; 'admin',
  'password' =&gt; 'password',
);
$data = http_build_query($data, '', '&amp;');
$headers = array();
$options = array(
  'headers' =&gt; array(
    'Accept' =&gt; 'application/json',
  ),
  'method' =&gt; 'POST',
  'data' =&gt; $data
);
$response = drupal_http_request($base_url . '/user/login', $options);
$data = json_decode($response-&gt;data);
// Check if login was successful
if ($response-&gt;code == 200) {
  // Now recycle the login cookie we recieved in the first request
  $options['headers']['Cookie'] = $data-&gt;session_name . '=' . $data-&gt;sessid;
  // Get info about a user
  $data = array();
  $options['data'] = http_build_query($data, '', '&amp;');
  $options['method'] = 'GET';
  $response = drupal_http_request($base_url . '/user/32', $options);
}


Below one worked for me

curl -H 'Content-type: application/json'  -d '{"username":"admin", "password": "admin"}' http://localhost/d7/testendpoint/user/login


In your case it should be

curl -H 'Content-type: application/json'  -d '{"username":"u10", "password": "123"}' http://localhost/test/api/user/login