Jump to content

mikebloom

Members
  • Posts

    1
  • Joined

  • Last visited

mikebloom's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I'm trying to use the blesta api to login clients but I can't get it to work. Other API calls is working e.g. users get. Could somebody maybe explain to me how the API works and help me out with my script, I'm guessing it has something to do with sessions. I'm getting a blank page with the following code: <?php require_once "blesta_api.php"; $user = "api"; $key = "70db2394eb4aa4575fcd1899ee1ed951"; $url = "http://192.168.1.1/index.php/api/"; $api = new BlestaApi($url, $user, $key); $data = array( 'vars' => array( 'username' => "test", 'password' => "password", 'remember_me' => "false", 'ip_address' => "192.168.0.1" ) ); $response = $api->get("users", "login", $data); print_r($response->response()); print_r($response->errors()); ?> Regards, Mike
×
×
  • Create New...