question

myfitment avatar image
0 Likes"
myfitment asked ·

How can we ensure that we don't miss any alerts?

We're struggling trying to figure out exactly how we're supposed to ensure that we can get every alert for our users, so that we can keep listings up to date in our seller software. It's a non-trivial task because of the lack of documentation on how the session data is supposed to behave.

 

One particular thing that we're not clear on: Do we need to maintain CONSTANT logins for each user to the Client Alerts API? That really seems excessive. Ideally what we would like to do is have a background process that constantly:

 

1) Loop through our users

2) establish a login session to the client alert api for the user

3) get user alerts, and use the returned SessionData in the next loop for this user

4) logout of the alert session.

 

Of course, when we do that, we get errors that the Session data is invalid during the next call. So what it looks like now is:

 

1) Establish a login session for every single user

2) Loop through the users

 

3) get user alerts, and use the returned SessionData in the next loop for this user

4) Never, ever log out

 

I sure hope that is not the case. I would like to save the SessionData of the last successful call in the user's profile, for use next time. And in case we have to start the program over during a deployment. Or if we had a server crash. Right now, it looks like if your polling program goes down, you're just going to lose everything that happened between the beginning of the downtime and the time you get back up. That can't possible be correct. Yet that appears to be the only way we can even see any events. What am I missing?

getuseralerts
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

myfitment avatar image
0 Likes"
myfitment answered ·

The breakdown here is that GetUserAlerts ONLY accepts the SessionID and SessionData that is returned from the Login call. Once we substitute SessionData with the value returned from the first GetUserAlerts call, the call fails with:

 

{"Timestamp"=>"2013-07-31T18:51:59.634Z", "Ack"=>"Failure", "Errors"=>[{"ShortMessage"=>"Invalid Session ID.", "LongMessage"=>"The session data string that you provided is not valid.", "ErrorCode"=>"11.8", "SeverityCode"=>"Error", "ErrorParameters"=>[{"ParamID"=>"0"}], "ErrorClassification"=>"RequestError"}], "Build"=>"E831_CORE_APINOT_16202451_R1", "Version"=>"831"}

 

It's too bad that it doesn't seem to work.

· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

vijayta.developersupport avatar image
0 Likes"
vijayta.developersupport answered ·

Hi

 

I hope you have already evaluated the that using Client Alerts over Platform Notifications is the right choice for  your application.

 

As you may already know the SessionId will last only for 24 hours : http://developer.ebay.com/DevZone/client-alerts/docs/Concepts/ClientAler...

 

For the above error, another reason could be the URL-encode issue : https://ebaydts.com/eBayKBDetails?KBid=1977

 

Please file a support ticket for further assistance : http://developer.ebay.com/support/developersupport/

 

Thanks

· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.