How to authenticate suitecrm with mobile application using web service

I customize the application web sugarCRM to my need and I have to realize a hybrid mobile application using Ionic framework and AngularJS. I want to make a authentication from the mobile application. In my folder js/factory/userProvider.js i have this code

app.factory(‘userProvider’, function($rootScope, $http) {
function signIn(User) {
var url = 'The url of the api ';
$http.post(url,Userser).success(function (response) {
console.log(response);
});
return{ signIn: signIn }
}
});
My big problem is that SugarCRM already has web services and I don’t know the url to use for the authentication. In my folder js/controllers/homepageController i have this code :

app
.controller(‘homepageIndex’, function ($scope) { })
.controller(‘homepageLogin’, function ($scope, userProvider) {
$scope.user = {};
$scope.signIn = function (user) { userProvider.signIn(user); }
});
So I want to know how to use the web services of sugarCRM to authenticate in my mobile application.

https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Application_Framework/Web_Services/Examples/REST/PHP/Logging_In/

best regards

1 Like

i saw the documenation , but this code I’ll put it in the file suitecrm if yes in wich folder ? or in mobile application ? this is my first experience with suitecrm this is my first experience with suitecrm and with CRM in general.
thank u .

you need to contact the REST url of the SuiteCRM site documented here https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Application_Framework/Web_Services/REST/ and send the variables from your application via POST

best regards

1 Like

i found the Standard Authentication Example :

<?php $url="http://127.0.0.1/suitecrm/service/v4_1/rest.php $username="admin"; $password="root"; function call($method,$parameters,$url){ .... } .... #### end Standard authentification ### but this code php where we will put it in suitecrm ?

you need to put that file anywhere that you can access from your application

best regards