My request looks like this.
$config = array(
'url' => 'https://eu1.psb.fsapi.com/mp/v1/authentication/login',
'key' => 'myKey'
);
$data = array(
'username' => 'myUsername',
'password' => 'myPassword'
);
$headers = array(
'Content-Type: application/x-www-form-urlencoded',
'X-API-Key: '.$config['key']
);
/*list of curl options*/
$options = array(
CURLOPT_URL => $config['url'],
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_POST => TRUE,
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => $headers,
);
/*curl handler*/
$ch = curl_init();
/*set options*/
curl_setopt_array($ch, $options);
/*excute*/
$result = curl_exec($ch);
For some reason i get this:
{"errors":[{"code":3030,"message":"login.error.badCredentials","lockDuration":1800000,"maxFailedLogins":5}]}