这里是请求参数(URL = http://sugarcrm.localhost/service/v4_1/rest.php):如何在SugarCRM中解决错误40“访问被拒绝 - 您无法访问”?
method=get_entry_list&input_type=json&response_type=json
&rest_data {"session":"2q67jvlce802e4htsqc94oshkat9henvicvfclprhrbd8ef6k0o0",
"module_name":"Contacts",
"query":"[email protected]",
"order_by":"",
"offset":0,
"select_fields":[],
"link_name_to_fields_array":[],
"max_results":0,
"deleted":false}
我得到这个结果:
"{"name":"Access Denied","number":40,"description":"You do not have access"}"
编辑
这个错误被触发每当子查询的格式不正确,不一定当一个人无法访问模块时,所以应该意识到这一点。
的rest_data部分应该是所有JSON和URL编码。除此之外,你确定你正确的模块访问? – jmertic
如果我将查询从[email protected]更改为first_name = chaouche,则它可以正常工作。我已阅读[此博客文章](http://developers.sugarcrm.com/wordpress/2012/02/08/changes-to-web-services-api-in-sugarcrm-6-4-0/#disqus_thread ),但并没有完全理解人们在评论中所说的话。查询参数中是否存在某种限制?因为改变这个单一的参数让我围绕着拒绝访问错误。并回答你的问题:不,我不知道我是否有适当的模块访问权限,我该如何检查这个问题? – ychaouche