Best Practice for Setting Up eBay’s OAuth in API Connector?

Hi everyone,

I’m integrating eBay’s API using OAuth2 to authenticate and then making calls to the Browse API.

My Questions:

  1. What is the best way to configure OAuth2 Custom Token in the latest API Connector for this setup?
  2. If OAuth2 Custom Token isn’t ideal, should I be using None or self-handled instead?

Would appreciate any guidance from those who have done this recently.

Thanks!

oauth2 custom token will work if I remember to use with your own account. It’s been a while since I set ebay auth, but if I remember correctly, custom token is fine. Check for client_credentials flow.

I tried setting up OAuth2 Custom Token with the client_credentials flow, but I ran into issues. Specifically, the API Connector doesn’t seem to recognize the token response properly there’s no field for “JSON path for token” or “Token prefix,” so it doesn’t automatically attach the token to subsequent API calls.

Has anyone successfully set this up with eBay recently? If so, could you confirm:

  1. How you structured the body parameters (grant_type=client_credentials and scope) in Bubble?
  2. Whether OAuth2 Custom Token correctly handles eBay’s token response, or if you had to use None or self-handled instead?

No you can use custom oauth2. How did you set it? Screenshot?
Bubble will automatically set other API calls authorization with header “Authorization: Bearer access_token”. No need to do anything for that. No need to tell Bubble the JSON path for the token because this use a “standard” oauth2 process.

For the parameters, it could be it the url or in the JSON body, but using grant_type=client_credentials&scopes=listofscopes space separated"

Also, you need to add header for token with Authorization: Basic <B64-encoded-oauth-credentials> and another header for Content-type: application/x-www-form-urlencoded

I also then have underneath

Then when I click on initialze call i get

You didnt add the call at the same place of your auth. You created another api connection. Look where you have the custom auth, click add another call. Not another api.

I just moved it to underneath the API rather than another connection

And now get the following


You need to url encode scopes. Not sure if bubble do it or not automatically.