Similar to vTiger web services: Permission to perform the operation is denied for query
I'm trying to query vTiger, but I'm using httpful so here's my code:
// vTiger: GET Query
// http://vtiger_url/webservice.php?operation=query&sessionName=[session id]&query=[query string]
$query = "SELECT * FROM Surveys;";
$uri = $vTiger_uri . "?operation=query&sessionName=" . $sessionName . "&query=" . $query;
$response_j = \Httpful\Request::get($uri)->send();
$response = json_decode($response_j, true);
echo "<p>Query: " . $query . "</p>";
echo "<pre>";
print_r($response);
echo "</pre>";
And I get this back:
Array
(
[success] =>
[error] => Array
(
[code] => ACCESS_DENIED
[message] => Permission to perform the operation is denied for query
)
)
I fear I'm missing something very simple, but having checked answers that refer to Zend and Curl I just can't puzzle out why it doesn't work with httpful, something to do with encoding the query string? :-(