Change the permissions needed in a service to get info from a module? I'm adding Services integrations to the Room Reservations module. A service I need to expose is the times when reservations can be made. I found a function inside room_reservations.inc (the function is _room_reservations_facility_hours()) and created a action type of service pointing to that function.

The problem here is that only the administrator user can have access to the output of this web service, whenever another user (even with the Administrator role) consumes the service I receive a 403 error. Is there a way I can solve this?

The Service declaration

$room_service = array(
    'room_reservations'=&gt;array(
    'actions'=&gt;array(
    'get_times'=&gt;array(
      'help'=&gt;'Gets the hours and the days reservations can be made',
      'file'=&gt;array(
        'type'=&gt;'inc',
        'module'=&gt;'room_reservations',
        'name'=&gt;'includes/room_reservations.service'
        ),
      'callback'=&gt;'_room_reservations_service_get_open_hours',
      ),
  ),
),


The callback function (which connects to _room_reservations_facility_hours())

function _room_reservations_service_get_open_hours(){
  $dates = _room_reservations_facility_hours(TRUE);
  $i=0;
  $realDates = array();
      foreach ($dates as $key =&gt; $value) {
      //array_push($realDates, $dates[$key]);
        //$realDates[$key]=$dates[$key];
        if ($i&lt;8) {
          $realDates[$key]=$dates[$key];
          $i++;
        }

    }
  //$standarized[] = $dates;
  $standarized[] = $realDates;
  return $standarized;
}


Edit: I'm already using the CSRF Token as a header when consuming the service
Sounds like an authentication issues - have you read up on tokens? There's a couple of modules out there, one pretty recent, plus some doc:

https://www.drupal.org/project/services_token_access
https://www.drupal.org/project/services_token
https://www.drupal.org/node/2424977