I am using OAuth2 for connecting my app with user's salesforce account. I am making authorization request with success and getting following things in response
- token_type: Bearer
When I am trying to fetch salesforce data with following code
Dim binding As sforce.SforceService binding = New sforce.SforceService() binding.SessionHeaderValue = New sforce.SessionHeader() binding.SessionHeaderValue.sessionId = <<access_token>> ' This is obtained by above step binding.Url = <<id>> ' This is obtained by above step dgr = binding.describeSObject("case")
I am getting exception
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session hash: dGNP7MWaYz4kTAATqdvCAQk8H5NxD/xw/L+PpuPMpFA= This error usually occurs after a session expires or a user logs out.
How can I fix it? I am sure I am passing something wrong but can't figure out what.