Home
Find the answer to your question
I am using the .NET SDK to make a call to GetSessionID and I get the following error:
<FaultDetail>
<ErrorCode>35</ErrorCode>
<Severity>Error</Severity>
<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>
</FaultDetail>
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="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<RequesterCredentials xmlns="urn:ebay:apis:eBLBaseComponents">
<Credentials>
<AppId>appid</AppId>
<DevId>devid</DevId>
<AuthCert>******</AuthCert>
<eBayAuthToken>XXXXXXXX</eBayAuthToken>
</Credentials>
</RequesterCredentials>
</soap:Header>
<soap:Body>
<GetSessionIDRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<MessageID>f61d5418-150e-4cc5-8dbe-ea30db6a86eb</MessageID>
<Version>561</Version>
<RuName>your_runame</RuName>
</GetSessionIDRequest>
</soap:Body>
</soap:Envelope>
To resolve this issue, you need to explicitly set the eBayAccount property to null as below:
C#
context.ApiCredential.eBayAccount = null;
VB.NET
context.ApiCredential.eBayAccount = Nothing
Additional Info
API Documentation: Authentication & Authorization