For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Sort by

GetSessionID returns error "Invalid user name or password"

  • Answer ID 1266
  • Published 08/31/2016 10:12 PM
  • Updated 08/31/2016 10:12 PM
  • Permalink

I am using the .NET SDK to make a call to GetSessionID and I get the following error:

<DetailedMessage>Invalid user name or password. The username/password pair specified for the user is not valid. You may not use an email address as a username if the member has a User ID.</DetailedMessage>

Why am I getting this error?

Detailed Description

This issue happens only in SDK versions earlier than 595. 

For most of the calls a user token is expected.  However, in the case of GetSessionID, you do not send any user token, since the call itself is used to help get a token.  Since there no token, it sends in an empty UserID and Password field, which causes the error.

If you look at the log file, this is what it sends:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=""xmlns:xsi=""xmlns:xsd="">
  <RequesterCredentials xmlns="urn:ebay:apis:eBLBaseComponents">
  <GetSessionIDRequest xmlns="urn:ebay:apis:eBLBaseComponents">

To resolve this issue, you need to explicitly set the eBayAccount property to null as below:

context.ApiCredential.eBayAccount = null; 

context.ApiCredential.eBayAccount = Nothing 

Additional Info    

API Documentation: Authentication & Authorization  

How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter