salesforce rest api INVALID_SESSION_ID error
How are you passing the sessionId to the /services/data/v20.0 request?, if your access_token is abc123
then you need a http header of Authorization: OAuth abc123
in the request.
API session in salesforce expires regardless if there are activities or not. to set the duration of each session go to Setup > Administration Setup > Security Controls > Session Settings>
the max is 8hours.
cheers!