Custom Endpoints - noLoginRequired = true not working.

Hello Folks

I have created my custom EndPoint where if 

noLoginRequired = true then its working but current_user id not getting.

If I change that 

noLoginRequired = false then its showing below error

error: "need_login", error_message: "No valid authentication for user."}
'GetBulkSMSBodyEndpoint' => array(
'reqType' => 'POST',
'noLoginRequired' => false,
'path' => array('GetBulkSMSBody'),
'pathVars' => array(''),
'method' => 'GetBulkSMSBody',
'shortHelp' => '',
'longHelp' => '',
),

Let me know what i have did wrong.. Calling this Endpoint from js

$.ajax({
url: 'rest/v10/GetBulkSMSBody',
type: 'POST',
data: {modulefrom: 'Leads', recid: id_array.toString()},
success: function (get_body) {
console.log(get_body);
$("#bulk_dashboardDialog").empty();
$("#bulk_dashboardDialog").append(get_body['res_data']);
}
});
Parents
  • I'm not sure I understand what you're trying to do. This is working exactly as intended though.

    If "noLoginRequired" is set to "false", then you need to provide a valid access token which is associated with a valid user.

    If "noLoginRequired" is set to "true", then an access token is not required and the request is associated with no user.

    App Ecosystem @ SugarCRM

Reply
  • I'm not sure I understand what you're trying to do. This is working exactly as intended though.

    If "noLoginRequired" is set to "false", then you need to provide a valid access token which is associated with a valid user.

    If "noLoginRequired" is set to "true", then an access token is not required and the request is associated with no user.

    App Ecosystem @ SugarCRM

Children