use xmlrpc to authenticate and create a node via services module 3.x and drupal 7 I want to use services module 3.x, drupal 7 and xmlrpc to create a node from a php client. However, I don't know how to deal with the authentication. I enable the session authentication but I don't know what I should do and I get error: HTTP/1.0 401 Unauthorized: Access denied for user anonymous.

ps: I can get session name and session id from user.login
Note: this is valid after SERVICES 3.5 (lower version are deprecated, anyway)

// USER LOGIN
$authenticate = xmlrpc($settings['server'], Array('user.login' =&gt; array($settings['user'] , $settings['password']),));

// CREATE HEADERS
$options['headers']['Cookie'] = $authenticate['session_name'] . '=' . $authenticate['sessid'];

// GET TOKEN
$token = xmlrpc(url($this-&gt;endpoint, array('absolute' =&gt; TRUE)), array('user.token' =&gt; array()), $this-&gt;headers);

//INSERT TOKEN INTO HEADERS
$options['headers']['X-CSRF-Token'] = $token['token'];


At this point you should be authenticated and could create nodes at will.