A] var __sfdcSessionId = '{!GETSESSIONID()}'; In the first method you are using javascript to acess Session id whichgives the session id stored in the browser cookies.
B] "{!$Api.Session_ID}" when you are using this it means it gives you session id via Global variable.
Now I'm learning Web Serivce+Apex, and I used cURL tool as a client tools to access my Apex web service.
all examples in the developer guide give sample command as to how to access Apex web service through cURL command line. All these examples include the sessionID argument, but don't include how to get the session ID just through cURL command.
I know this question has nothing to do with Apex. But I just could find the answer to it somewhere else.
check:
http://developer.force.com/cookbook/recipe/scheduling-an-apex-call-from-the-command-line
for how to get Session ID through cURL command
All Answers
Hello James,
Please try with this
A] var __sfdcSessionId = '{!GETSESSIONID()}'; In the first method you are using javascript to acess Session id whichgives the session id stored in the browser cookies.
B] "{!$Api.Session_ID}" when you are using this it means it gives you session id via Global variable.
If it help please mark as solved
I didn't mean get Session ID through code.
Now I'm learning Web Serivce+Apex, and I used cURL tool as a client tools to access my Apex web service.
all examples in the developer guide give sample command as to how to access Apex web service through cURL command line. All these examples include the sessionID argument, but don't include how to get the session ID just through cURL command.
I know this question has nothing to do with Apex. But I just could find the answer to it somewhere else.
James
check:
http://developer.force.com/cookbook/recipe/scheduling-an-apex-call-from-the-command-line
for how to get Session ID through cURL command