You need to sign in to do that
Don't have an account?
bluecap
Custom Rest Service - INVALID SESSION ID
Ive created a single custom Rest service that Im trying to use to return multiple sObject types with. Im using cURL to verify that the service is working. The issue Im running into is occuring when I pass more than one parameter to the service.
This works:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=a -H 'Authorization: Bearer access token'
This does not work:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=b&id=001 -H 'Authorization: Bearer access token'
and returns..
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
Why would the second parameter cause this type of error?
This works:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=a -H 'Authorization: Bearer access token'
This does not work:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=b&id=001 -H 'Authorization: Bearer access token'
and returns..
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
Why would the second parameter cause this type of error?
All Answers
NOTE: When adding code please use the "Add a code sample" button (icon <>) to increase readability and make it easier to reference.