I have rest resource class which i am calling from force.com site..
Below is my site url
http://partial-sms.cs31.force.com/webhook
@RestResource(urlMapping='/webhook/*')
global without sharing class smsSiteAPI {
@HttpGet
global static ID getUrlParameters(){
Id urlId = apexpages.currentpage().getparameters().get('id');
system.debug('Url id '+urlId);
return urlID;
}
}
And below is the Active Site Home Page
<apex:page controller="smsSiteAPI">
<apex:outputText value="{!UrlParameters}" />
</apex:page>
when i hit url "https://partial-sms.cs31.force.com/webhook?id=1234" it gives error: "Authorization Required You must first log in or register before accessing this page. If you have forgotten your password, click Forgot Password to reset it."