Home
Find the answer to your question
Detailed Description
An application subscribing to Platform Notifications can set UserData.ExternalUserData to identify user account
To enable platform notification events and also associate the UserData.ExternalUserData for each of your platform notification subscribers, you will need to make two SetNotificationPreferences calls with the same Auth & Auth token for each users or subscribers. Here are the steps:
1. Subscribe to platform notification user events by passing through the UserDeliveryPreferenceArray container as below in SetNotificationPreferences call:
<?xml version="1.0" encoding="utf-8"?> <SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <Version>765</Version> <RequesterCredentials> <eBayAuthToken>TOKEN FOR USER_1</eBayAuthToken> </RequesterCredentials> <UserDeliveryPreferenceArray> <NotificationEnable> <EventType>EndOfAuction</EventType> <EventEnable>Enable</EventEnable> </NotificationEnable> <NotificationEnable> <EventType>AuctionCheckoutComplete</EventType> <EventEnable>Enable</EventEnable> </NotificationEnable> <NotificationEnable> <EventType>Feedback</EventType> <EventEnable>Enable</EventEnable> </NotificationEnable> .... </UserDeliveryPreferenceArray> </SetNotificationPreferencesRequest> |
2. Use the same auth tokon and make SetNotificationPreferences call to associate the UserData.ExternalUserData for the use
<?xml version="1.0" encoding="utf-8"?> <SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <Version>765</Version> <RequesterCredentials> <eBayAuthToken> TOKEN FOR USER_1</eBayAuthToken> </RequesterCredentials> <ApplicationDeliveryPreferences> <ApplicationURL>END POINT URL</ApplicationURL> <ApplicationEnable>Enable</ApplicationEnable> <PayloadVersion>751</PayloadVersion> </ApplicationDeliveryPreferences> <UserData> <ExternalUserData> Sample ExternalUserData </ExternalUserData> </UserData> </SetNotificationPreferencesRequest> |
<?xml version="1.0" encoding="utf-8"?> <GetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <Version>765</Version> <RequesterCredentials> <eBayAuthToken>TOKEN FOR USER_1</eBayAuthToken> </RequesterCredentials> <PreferenceLevel>UserData</PreferenceLevel> </GetNotificationPreferencesRequest> |