I get "You are not authorized to access this page" when I try to load a view with Ajax
Try with page arguments in hook_menu:

function custom_api_menu() {
  $items['ajaxgettip/nojs/%'] = array(
      'page callback' =&gt; 'custom_api_test_ajax',
      'page arguments' =&gt; array(2),
      'type' =&gt; MENU_CALLBACK,
      'access callback' =&gt; TRUE,
  );
  $items['ajaxgettip/ajax/%'] = array(
      'delivery callback' =&gt; 'ajax_deliver',
      'page arguments' =&gt; array(2),
      'access callback' =&gt; TRUE,
  );
  return $items;
}