function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
azu.shaik1.3965080575576013E12azu.shaik1.3965080575576013E12 

i had create the below rest api class. when try to access the class getting the invalid_session id ?

Hi ,

i had create the below rest api class. when try to access the class getting the url getting  invalid_session id ?

@RestResource(urlMapping='/FieldCase/*')
global with sharing class RESTCaseController {

@HttpPost  
  global static String createNewCase(String companyName, String caseType) {
     System.debug('COMPANY: '+companyName);
     System.debug('CASE TYPE: '+caseType);
     return null ;
    }
}
ShashForceShashForce
Hi,

Please see if these linkks help:
http://salesforce.stackexchange.com/questions/21621/invalid-session-id-in-salesforce-restapi
http://stackoverflow.com/questions/6095352/salesforce-rest-api-invalid-session-id-error

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
Dev.AshishDev.Ashish
How did  you do authentication? From where you are calling this rest service, like from java application?
azu.shaik1.3965080575576013E12azu.shaik1.3965080575576013E12
Hi Dev,

I dont how to authenticate this one . i would like call this service  to php. 
please help me in this conditon i was stuck with is from couple of days
ShashForceShashForce
Please see if this helps: http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php