+ Start a Discussion
TestingSFUserTestingSFUser 

i am getting this error while invoking our Org from Third party Services..i.e. Workbench tool

User-added image
i am getting this error while invoking our Org from the Third party Services..i.e. Workbench tool.. this is a @httpGET method.
TestingSFUserTestingSFUser
and Apex code is...


@RestResource(URLMapping='/LeadRecordService/*')
Global class LeadRecordBasedOnID
{
    @HttpGet()
    Global static lead GetRecordByID()
    {
        Map<String, string> mapInputs =    RestContext.request.Params;
                        
        lead leadRecord = [Select id, firstname, lastname
                                          from lead
                                              Where id =: mapInputs.Get('Id')];
        return leadRecord;
    }
}