Find the answer to your question
Advanced Search
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.
- A user indicates an intention to use your application (for example, by clicking a Subscribe button in your application interface).
- Your application makes a GetSessionID request to eBay, and receives a session ID (SessionID).
GetSessionID is described in reference detail at GetSessionID.
- 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 &runmae=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>
- The user signs in on the eBay sign-in page.
- eBay forwards the user to your application's consent form.
- The user consents or rejects your application.
- eBay forwards the user to an eBay page that confirms their action (they are thanked and told, "You may close this window").
- 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>1235</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
- What are the timing issues associated with obtaining and using tokens?
- Can a seller of one app Revise the items listed by another token that belongs to the same seller, who is also associated with another application
- How to create an eBay Sandbox account ?
- Client Alerts API not working
- How is an RuName linked to my Application and my Tokens?