question

thinkkaltd avatar image
0 Likes"
thinkkaltd asked ·

GetMyeBaySelling Fails on Second page with "Invalid Application Name"

I have a strange problem, using the .NET API. Just recently when using the GetMyeBaySelling API I can load the first page fine, but subsequent pages return an error "Invalid Application Name" Obviously I am using the same credentials for both posts as this is code running in a loop. The code below shows I am literally just looping a post to GetMyeBaySelling with the only difference each time being the PageNumber value. ServiceInterface is a custom class that basically contains all the credentials and the endpoint to post to etc. Dim ServiceInterface As New eBayService(e_settings, "GetMyeBaySelling") Dim svc As eBayAPIInterfaceService = ServiceInterface.Service Dim isLastPage As Boolean = False Dim PageNumber As Integer = 1 Do While Not isLastPage ' Set up the Request (Post to eBay) Dim request As New GetMyeBaySellingRequestType With { .Version = ServiceInterface.Version, .WarningLevel = WarningLevelCodeType.Low, .ActiveList = New ItemListCustomizationType() With { .Include = True, .Pagination = New PaginationType With { .EntriesPerPage = 200, .PageNumber = PageNumber, .EntriesPerPageSpecified = True, .PageNumberSpecified = True } }, .SoldList = New ItemListCustomizationType() With { .Include = True }, .WarningLevelSpecified = True, .DetailLevel = {DetailLevelCodeType.ReturnSummary} } Dim Res As GetMyeBaySellingResponseType = svc.GetMyeBaySelling(request) ' SNIP - do stuff with Res ' ALL of this works first time, but on the second loop after PageNumber has been increased to 2, we don't get this far. An error is returned "Invalid Application Name" from the svc.GetMyeBaySelling(request) line. ' Determine Page Number and if this is the last page isLastPage = res.ActiveList Is Nothing OrElse res.ActiveList.ItemArray Is Nothing OrElse Not res.ActiveList.ItemArray.Any PageNumber += 1 Loop
.NETgetmyebaysellinginvalid application
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.

eram_developersupport avatar image
0 Likes"
eram_developersupport answered ·
Hi @thinkkaltd , You are most welcome. Can you please post your entire code(without tokens) in github so that we can try from our end? Best Regards, eBay Developer Support
· 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.

thinkkaltd avatar image
0 Likes"
thinkkaltd answered ·
Hi, thanks but I have already seen that post and it is not my problem. On further investigation, I have found from https://developer.ebay.com/devzone/xml/docs/reference/ebay/getmyebayselling.html The posting to getMyEbaySelling is limited to 300 posts per 15 seconds *per application*. Now I am not posting anything like as many times as that, however the "per application" part makes me think it is something to do with this for two reasons: 1. The error is "Invalid Application Name" -related to the application 2. I *only* get this error when posting in looping code. So I have modified my code, which runs as a background task to clean up and ensure consistency between eBay and my local data, so that instead of running one call which loops the pagination, I now schedule a new task for each page and space them out. Since my task scheduler is set by the server I am restricted to a minimum schedule interval of 15 minutes, therefore I fetch one page every fifteen minutes and everything works fine! I imagine I could run the task spacing closer together than every fifteen minutes, but I have no way of doing that safely. I did try adding a 15 second delay between loops in my previous code example as above but it didn't work. I do't want to leave threads hanging so don't want any code based delays between loops anyway. So in conclusion, I have resolved my problem for now but: - it won't be practical if the number of items on eBay becomes excessive (I am currently working with < 2000) - according to the docs, I should be able to post in the loop so long as I don't exceed 300 posts in 15 seconds! So I think there's something up with the throttling code on the endpoint server....
· 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.

eram_developersupport avatar image
0 Likes"
eram_developersupport answered ·
Hi @thinkkaltd, There is couple of reasons getting &quot;Invalid Application Name&quot; error: REF: [DOC][1] Best Regards, eBay Developer Support [1]: https://ebaydts.com/eBayKBDetails?KBid=903
· 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.