I’m trying to use the APIs (V4_1 from Sugar documentation),
But I’m developing my code in Node.JS (Javascript)
I’ve been trying to get the login api to work, but it fails all the time
This is my input:
{
"user_auth":
{"user_name":"test",
"password":"test"},
"application_name":"teste",
"name_value_list": {
"name":"notifyonsave",
"value":"true"
}
}
I’m using Postman to test
Regards
Hello,
as you are sending password as plain text, you need send encryption as plain too.
$user_auth['encryption'] = 'PLAIN'
I’ve tested with both plain text with this encrypted option and with MD5 sum
and still not works
The code below is for the live demo of suiteCRM
URL: http://demo.suiteondemand.com/service/v4_1/rest.php?method=login
{
"user_auth":
{
"user_name":"will",
"password":"18218139eec55d83cf82679934e5cd75"},
"application_name":"",
"name_value_list": {
"name":"notifyonsave",
"value":"true"
}
}
This is what i get, from my server and from demo server as well
500 Internal Server Error
10: Invalid Login
Login attempt failed please check the username and password
Hello
Try below
/service/v4_1/rest.php?method=login&input_type=JSON&response_type=JSON&rest_data=
{
"user_auth":
{
"user_name":"will",
"password":"18218139eec55d83cf82679934e5cd75"},
"application_name":"",
"name_value_list": {
"name":"notifyonsave",
"value":"true"
}
}
1 Like