Bug in example PHP application
if you're using the provided example PHP application there's a small bug that can impact authentication.
In function getAuthTokenByAdminCredentials
$data = sprintf("grant_type=%s&username=%s&password=%s&scope=%s", 'password', $login, $password, $this->tokenScope);
$data = sprintf("grant_type=%s&username=%s&password=%s&scope=%s", 'password', urlencode($login), urlencode($password), urlencode($this->tokenScope));
We had a user unable to login and found that a reserved character in the password meant the string was being incorrectly parsed. urlencode() escapes special characters so they are passed through correctly.
Thanks for contribution. PHP sample on github is updated.