Seems legit, but you have a lonely semicolon here:
CURLOPT_URL => 'https://myserver/api/v1/auth/authenticate-user';,
I tried your code removing it:
r00tshell@mx1-ng:~/scripts# php test.php
Returned: {"emailAddress":"","changePasswordNeeded":false,"passwordExpired":false,"displayWelcomeWizard":false,"isAdmin":false,"isDomainAdmin":false,"isLicensed":true,"autoLoginToken":"","autoLoginUrl":"","localeId":"en","requirements":null,"isImpersonating":false,"canViewPasswords":false,"accessToken":"","refreshToken":"","accessTokenExpiration":null,"refreshTokenExpiration":null,"username":null,"success":false,"resultCode":401,"message":"LOGIN_FAILURE_DOMAIN_NOT_FOUND"}<BR>
There is an answer... Of course wrong login as I didn't changed the credentials...
Sébastien Riccio
System & Network Admin
https://swisscenter.com