API problem : Access Denied => You do not have access

I am working with the REST api in php and if i try to get all leads from the table leads by there porperties (many to many) i always get this error message :

stdClass Object ( [name] => Access Denied [number] => 40 [description] => You do not have access )

The code :

Is there any way to get such relationsships using the API ?

regards
Marianne

Hi Marianne,

I have not checked this, however it could be worth looking to see if the roles for that user that you are logged in as have been set to remove access, the other thing to look at is if the module is not in the menu and is hidden from the view.

We have checked that the Admin can remove access and the module is not hidden.
We have created a costum module Properties, wich has a many to many relationship to Leads. Now we are looking for a method to get the leads with there properties together through the API.

With this code we get only the properties ids and there names but without there related leads. The relationship_list ist always empty.

$get_entry_list_parameters = array(
‘session’ => $this->sessionId,
‘module_name’ => ‘Leads’,
‘module_id’ => ‘ba52a333-9082-d114-170a-54c108a9366e’,
‘link_field_name’ => ‘prop_eigenschaft_leads’,
‘related_module_query’ => ‘’,
‘related_fields’ => array(
‘id’,
‘name’,
),
‘related_module_link_name_to_fields_array’ => array(
“prop_eigenschaft_leadsleads_idb”=>array(

    'name',
    'id',
),

),

'deleted'=> '0',
'order by' => "",
'offset' => '0',

);

$results = $this->call(‘get_relationships’, $get_entry_list_parameters, $this->apiUrl);