This is to check that your SugarCRM/SuiteCRM instance is serving to accept external application, like Yathit Mobile App or Chrome Extension.
Yathit Mobile App, as well as Chrome Extension, use SugarCRM REST API. If Yathit mobile could not login, it is very likely that your CRM may have issue serving REST API. Serving REST API requires additional PHP modules, which is not require just for serving Sugar web portal. It is also possible PHP error and warning message are messing up in REST API output.
To check it, use the following REST login as bash shell.
url=https://demo.suiteondemand.com
username='max'
password='max'
# passhash=$(md5 -q -s $password)
passhash=$(echo -n $password | openssl md5 | awk '{print $2}')
# passhash=$(echo -n $password | md5sum | awk '{print $1}')
body="method=login&input_type=JSON&response_type=JSON&rest_data=%7B%22user_auth%22%3A%7B%22user_name%22%3A%22$username%22%2C%22password%22%3A%22$passhash%22%7D%2C%22application_name%22%3A%22Yathit%20test%22%2C%22name_value_list%22%3A%7B%22language%22%3A%22en_us%22%2C%22notifyonsave%22%3A%22false%22%7D%7D"
curl "$url/service/v4_1/rest.php" -H 'Pragma: no-cache' -H 'Content-Type: application/x-www-form-urlencoded' --data $body
Where you will substitute url, username and password. In the above username is 'max' and password is 'max'.
If login success, respond body includes session id as follow:
{"id":"9n8ub14dq63rs232jthe352amo","module_name":"Users","name_value_list":{"user_id":{"name":"user_id","value":"seed_max_id"},"user_name":{"name":"user_name","value":"max"},"user_language":{"name":"user_language","value":"en_us"},"user_currency_id":{"name":"user_currency_id","value":""},"user_is_admin":{"name":"user_is_admin","value":false},"user_default_team_id":{"name":"user_default_team_id","value":null},"user_default_dateformat":{"name":"user_default_dateformat","value":"m\/d\/Y"},"user_default_timeformat":{"name":"user_default_timeformat","value":"H:i"},"user_number_seperator":{"name":"user_number_seperator","value":","},"user_decimal_seperator":{"name":"user_decimal_seperator","value":"."},"mobile_max_list_entries":{"name":"mobile_max_list_entries","value":null},"mobile_max_subpanel_entries":{"name":"mobile_max_subpanel_entries","value":null},"user_currency_name":{"name":"user_currency_name","value":"US Dollar"}}}
otherwise an error message will be return.
{"name":"Invalid Login","number":10,"description":"Login attempt failed please check the username and password"}
In either case, HTTP status code is 200.
Once successful login, you can use the session id to fetch protected resources form your CRM. See SuiteCRM documentation for available REST API methods.
For example, to query CRM metadata,
sessionid=9n8ub14dq63rs232jthe352amo
modulename=Contacts
body="method=get_module_fields&input_type=JSON&response_type=JSON&rest_data=%7B%22session%22%3A%22session%22%2C%22module_name%22%3A%22Contacts%22%7D"
curl "$url/service/v4_1/rest.php" -H 'Pragma: no-cache' -H 'Content-Type: application/x-www-form-urlencoded' --data $body