Hey Guys, i try to access the Ebay Trade API (SOAP API not REST) via Oauth 2. In general the oauth flow works fine and i am able to use the newer REST API as intended.
But because the API design of Ebay is bulls*** i also need to access an older SOAP API. According to ebays developer documentation this should work without any issue just by using the access token generated via the oath flow in the header of a SOAP Request. Here is the corresponsing ebay documentation: https://developer.ebay.com/api-docs/static/oauth-trad-apis.html
Now my question: How should i do this? I have no idea how to get the valid user access token from my oauth flow. I know that my SOAP Request should look like this (But i have no idea how to get a value for the “X-EBAY-API-IAF-TOKEN” header.
Anyone has an idea for that? Or do i really have to build up my own “Oauth Flow” to catch the Access Token and renew it once its not valid anymore?
I just spent the better part of the day trying to get the REST API connected to my ebay account. It kept failing at the very end, where the token exchange happens. Is there any way you can like share a config for the credentials that works?
After several days of trial and error, I finally got my Ebay/inventory automation up and running.
The problem is that the Ebay API’s use different authentication methods.
the old SOAP API (e.g. the Inventory API) and
a new REST API (e.g. Sell API 2.0).
Only the new API makes it possible to use the correct oauth flow. The other requires the bearer token directly.
So what I finally did (in my case I needed both APIs) is to build a first workflow that uses the new API - (in my case to create an inventory task) and at the end a node that calls a webhook of a second N8N workflow. The access token that I need for further authentication against the old school API is then automatically sent in the request header trriggert by the first workflow. Seems hacky…seems kind of unsave, but it works…
Get Node that calls my own 2nd Workflow with oath creds:
And the 2nd Workflow that use the old soap API with the “handed over” Access Token to reduce the item quanitity of a specific Ebay Article in our inventory:
For thoose who only want to use a newer Ebay REST API: Node should look like this:
It was such a pain in the a** to first set up an API developer account to even get the oath credentials, and then it’s even harder to understand this messi API design, and THEN I have to figure out how to implement that with N8N. Maybe this will help someone else so they don’t have to go through this hell too