tokenAdd
public static bool tokenAdd(string userName, string password, string token)
Add a token for the user.
Section
Security Related Methods

Parameters
string userNameYour Benchmark Email user name
string passwordYour Benchmark Email password
string tokenEnter your own token. Should be atleast 6 characters long. To delete an existing token use the tokenDelete method.

Returns
boolReturns true if the token was set.


Examples
download example code
xmlrpc_tokenAdd.php


  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $allOk = $client->tokenAdd($apiLogin, $apiPassword, "secrettoken");
  10. ?>