Need access token from oauth2 Auth Code Flow to access ebay's Trade API

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.

  1. the old SOAP API (e.g. the Inventory API) and
  2. 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:

…and the credentials config 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 :smiley:

@mdaria510 @sfx - Hope this will help

3 Likes