08-16-2023 02:45 AM - edited 08-16-2023 02:47 AM
Hey,
I want to subscribe to some events using my application, but I'm experiencing a problem.
I try to set up a notification about new messages to the seller.
So, I compose a SOAP request with such data (of course URL, email and app credentials are changed. I use valid credentials):
<?xml version="1.0" encoding="utf-8"?>
<SetNotificationPreferencesRequest
xmlns="urnapis:eBLBaseComponents">
<ApplicationDeliveryPreferences>
<ApplicationURL>my-url.example.com</ApplicationURL>
<ApplicationEnable>Enable</ApplicationEnable>
<AlertEmail>mailto://my-email@gmail.com</AlertEmail>
<AlertEnable>Enable</AlertEnable>
<DeviceType>Platform</DeviceType>
</ApplicationDeliveryPreferences>
<UserDeliveryPreferenceArray>
<NotificationEnable>
<EventEnable>Enable</EventEnable>
<EventType>AskSellerQuestion</EventType>
</NotificationEnable>
</UserDeliveryPreferenceArray>
<ErrorLanguage>en_US</ErrorLanguage>
</SetNotificationPreferencesRequest>
This is how my headers look like.
{
"Content-Type": "text/xml",
"X-Ebay-API-Call-Name": "SetNotificationPreferences",
"X-Ebay-API-Compatibility-Level": "1227",
"X-Ebay-API-SiteID": "0",
"X-Ebay-API-App-Name": "***",
"X-Ebay-API-Dev-Name": "***",
"X-Ebay-API-Cert-Name": "PRD-***",
"X-Ebay-API-IAF-Token": "v^1.1#i^1#f^0#I^3#p^3#r^0#t^...hgfTO4aAAA="
}
The response is successful ("Ack": "Success"). Then I try to send a message to seller about the item and get a notification stats using GetNotificationsUsage resourse.
{
"@xmlns": "urnapis:eBLBaseComponents",
"Timestamp": "2023-08-16T09:23:18.186Z",
"Ack": "Success",
"Version": "1173",
"Build": "E1173_CORE_APINOTIFY_19146596_R1",
"StartTime": "2023-08-16T05:23:16.000Z",
"EndTime": "2023-08-16T09:23:16.000Z",
"NotificationDetailsArray": {
"NotificationDetails": [
{
"DeliveryURL": "***",
"ReferenceID": "145227747874:2002637016",
"ExpirationTime": "2023-08-18T07:44:05.000Z",
"Type": "AskSellerQuestion",
"DeliveryStatus": "Rejected",
"ErrorMessage": "INVALID_AUTH_TOKEN_STATUS:Invalidated token: Token does not exist"
},
{
"DeliveryURL": "***",
"ReferenceID": "145227747874:2002637016",
"ExpirationTime": "2023-08-18T08:56:14.000Z",
"Type": "AskSellerQuestion",
"DeliveryStatus": "Rejected",
"ErrorMessage": "INVALID_AUTH_TOKEN_STATUS:Invalidated token: Token does not exist"
}
]
},
"MarkUpMarkDownHistory": null,
"NotificationStatistics": {
"DeliveredCount": "0",
"QueuedNewCount": "0",
"QueuedPendingCount": "0",
"ExpiredCount": "0",
"ErrorCount": "0"
}
}
So it should mean that notifications were going to be sent, but something happened. What does "INVALID_AUTH_TOKEN_STATUS:Invalidated token: Token does not exist" mean? All my SOAP requests work fine with token generated in my client.
08-23-2023 01:23 AM
I shouldn't use any 'special' token for this, should I? I just make a request with the token generated the same way as in any other situation. And if I get correct response from eBay while setting up the notification, I suppose the token is valid. Otherwise, I probably miss something from API docs.
09-26-2023 01:55 PM - edited 09-26-2023 01:58 PM
You are probably using a valid OAuth token in the
01-30-2024 06:04 PM
Its a disgrace that they don't even provide a way of contacting them to whitelist things like this without having to fork out $75 for an hour's support.