2

Using SOAP, I'm trying to log on to the Partner API. I can log in, change the service URL and I can create a SOAP Header with the Session ID and token.

I'm logging in with the username set to the account holder email address. This user is a System Administrator. The password is the salesforce password followed by an API Key.

However, when I try and call "DescribeGlobalResult" or "getServerTimestamp" or "getUserInfo" I get the error "SessionID Invalid at this location". I'm assuming that there are some API Security rights I need to set, but I can't find these.

What causes this error? How do I fix it?

4
  • 1
    What user are you logging in with? I'd try using another tool that works against the Partner API with the same credentials. Can you call other API methods against the Partner API, such as getServerTimestamp() or getUserInfo()? Are you putting the Session ID into the SessionHeader? – Daniel Ballinger Jan 14 '15 at 22:06
  • I'm logging in with a user with my email address. This is a system Administrator. I get the same error with getServerTimestamp and getUerInfo. The session Id is going in the header. In fact, if I remove the Session ID, I get a different error. – seanyboy Jan 14 '15 at 22:18
  • 1
    OK, good to rule that out. Can you try an independent tool that uses the Partner API with the same credentials? I know the FuseIT SFDC Explorer does logins via the Partner API because I made most of it. Based on that it would indicate if it is a code issue or a permissions issue. The Data Loader is another tool you could try the login via. – Daniel Ballinger Jan 14 '15 at 22:21
  • Used SoapUI and it worked. I had something to compare against then and it led me to the right solution. Thanks. – seanyboy Jan 14 '15 at 23:25
1

I was placing the Session ID in the Session Header as "SessionID".
It should have been "sessionID". (without the Capitalized first letter)

Reference: SessionHeader.sessionId.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.