+ Start a Discussion
SvenSven 

Apex Restservice "You do not have access to the Apex class named:" message

Hi,

 

I created an Apex rest service where i call some custom objects data. This rest service should be called by a High volume customer portal user. But when i do that then i always get the message "You do not have access to the Apex class named: PrRestService","errorCode":"FORBIDDEN"

 

I changed already some security settings on that class but until now no success, i added the profile of the portal user to that apex class but id doesn't help. The only thing that works is adding that class in the public settings of the site.

 

But then its public available and i don't want that. The standard security options should apply.

 

Do i need to change some other security settings to accomplish this?

 

Thanks

 

Sven

AmitSahuAmitSahu

is this class visible to System Admin as well "PrRestService" ?

SvenSven

Hi,

 

This Rest service works with the workbench and with an admin license. but if i want to test with portal license either with our java application or either with the curl in terminal then i got the access denied message.

 

although the correct profiles are added to the rest service. I tried eliminating the code and just output a text string but it is the same thing.

 

thx

Sven

AmitSahuAmitSahu

Portal user may not have access to the API call. Please test this issue by using any user which is using Salesforce license.