Skip to main content
Published: November 30 2011, 2:27:00 PMUpdated: November 28 2020, 10:08:43 PM

How to get your ClientAlerts

How to make a GetUserAlerts call

1. Create a user token for the user and application
2. Call GetClientAlertsAuthTokenRequest passing in the user token created in step 1
3. Using the ClientAlertsAuthToken from step 2, call Login to get SessionData
4. Call GetSessionID
5. Call GetUserAlerts with SessionData from 3 and SessionID from 4

Sample:

Step 1:

Get User Token:

In this process, some of the steps are completed by the user, some by eBay, and some by your application.

  1. A user indicates an intention to use your application (for example, by clicking a Subscribe button in your application interface).
  2. Your application makes a GetSessionID request to eBay, and receives a session ID (SessionID).

GetSessionID is described in reference detail at GetSessionID.

  1. Your application uses the session ID to construct an eBay sign-in URL that sends the user to the eBay sign-in page and consent form.

Use the following URL to redirect a user to the eBay sign-in page:

https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&RuName=RuName&SessID=SessionID

The URL must include &SessID=SessionID and &RuName=RuName. SessID identifies the user and RuName the application. The SessionID must be URL-encoded in the sign-in URL.

The equivalent URL for the Sandbox is:

https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn&RuName=RuName&SessID=SessionID

  1. The user signs in on the eBay sign-in page.
  2. eBay forwards the user to your application's consent form.
  3. The user consents or rejects your application.
  4. eBay forwards the user to an eBay page that confirms their action (they are thanked and told, "You may close this window").
  5. Your application calls FetchToken to retrieve the user token

See Getting a Token via FetchToken.

Step 2: GetClientAlertsAuthTokenRequest

<?xml version="1.0" encoding="utf-8"?>
<GetClientAlertsAuthTokenRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Version>743</Version>
<RequesterCredentials>
<eBayAuthToken>*****</eBayAuthToken>
</RequesterCredentials>
</GetClientAlertsAuthTokenRequest>

The response should contain a <ClientAlertsAuthToken>

Step 3: Call Login:

http://clientalerts.ebay.com/ws/ecasvc/ClientAlerts?
callname=Login&
callbackname=com.ebay.clientalertsservice.ClientAlerts.loginClosure&
responseencoding=JSON&

ClientAlertsAuthToken=Your ClientAlertsAuthToken from Step 2

Step 4: GetSessionID

<?xml version="1.0" encoding="utf-8"?>

<GetSessionIDRequest xmlns="urn:ebay:apis:eBLBaseComponents">

<RuName>MyRuNameHere</RuName>

</GetSessionIDRequest>

Step 5: Call GetUserAlerts

http://clientalerts.ebay.com/ws/ecasvc/ClientAlerts?
callname=GetUserAlerts&
SessionID=MySessionID from Step 4&
Session

Data=From Step 3

How well did this answer your question?
Answers others found helpful