I have rest resource class which i am calling from force.com site..
Below is my endpoint
https://cs22.force.com/services/apexrest/CustomerData/
@RestResource(urlMapping='/CustomerData/*')
global without sharing class CustomerInfoDataRest {
@HttpGet
global static List<Account> getAccountInfo() {
//String companyName = RestContext.request.params.get('companyName');
List<Account> companyList = [ Select ID, Name, personemail, BillingState from Account];
return companyList;
}
}
Error i am getting
<Errors><Error><errorCode>FORBIDDEN</errorCode><message>You do not have access to the Apex class named: CustomerInfoDataRest</message></Error></Errors>
I have checked Force.com site profile..I already have permission to the class CustomerInfoDataRest in that profile.
I have API enabled as well on Site profile..I have no idea why i am getting this error..
Best Answer
Few suggestions: