Skip to main content

Hello,

When I try to login in api V2 : it’s ok

curl --location --request POST 'https://nagios.mydomain/centreon/api/latest/login' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"security": {
"credentials": {
"login": "ecran-api-v1",
"password": "XXXXXXX"
}
}
}'
{"contact":{"id":61,"name":"ecran-api-v1","alias":"ecran-api-v1","email...

But the same user on api V1 doesn’t log in:

curl -s -k -d "username=ecran-api-v1&password=XXXXXXX" -H "Content-Type: application/x-www-form-urlencoded" -X POST "https://nagios.mydomain/centreon/api/index.php?action=authenticate"
"Authentication failed"%

Is there a magic option “allow api v1” or anything else I’ve missed ?

Some post that might help 

 

 

Header set Access-Control-Allow-Credentials true


Reply