To connect your eBay account to API2Cart, send cart.create request usingPOST method (!) from your API2Cart account. This request should contain the following parameters:
api_key = YOUR_API_KEY
cart_id = EBay
verify = true
ebay_environment = production
How to get parameters marked in red above:
ebay_client_id - App ID
ebay_client_secret - Cart ID
Go to the eBay developers program page https://developer.ebay.com/my/auth/Log in to your account or register one. After the successful authentication, you will land on Application Keys page, which looks like this:On the screenshot above we’ve highlighted the keys needed to connect your eBay account to API2Cart: ebay_client_id and ebay_client_secret.
Go to the User Tokens page: https://developer.ebay.com/my/auth. To get RuName, go to User Tokens tab-> Get a Token from eBay via Your Application -> press Add eBay Redirect URL - there will appear a setting page -> tick the box under OAuth Enabled -> get your parameter RuName (eBay Redirect URL name).On the same page (User Tokens) set up Sign-in settings.1) 2) Switch on OAuth: 3) Your auth accepted URL - here specify a URL link on which you’ll get the code, which is a very important parameter. 4) Save settings. Click the link in the field: Your branded eBay Sandbox Sign In (OAuth) - copy this big URL link and paste it into the address bar. There you will see the following page:Sign in to your seller eBay account, then go to page Grant application access to Token Name: press Agree, then you will be redirected to the page you’ve specified in the field Your auth accepted URL.On that page you will receive data in the following format: state:nullcode:v^1.1#i^1#r^1#p^3#f^0#I^3#t^Ul41Xzg6MDM5RENGM0E3NEIxNTJDQkU5QjQxMDA2MjA5NjRBOTRfMV8xI0VeMTI4NA==And the last step, use “code” to getrefresh_token. You can do this via POSTMAN. Send POST request to this link https://api.ebay.com/identity/v1/oauth2/token, specify in Body parameters grant_type, code and redirect_uri, like we did on the screenshot below. Make sure "code" parameter value is not url encoded before passing it as a request parameterOn the Authorization tab choose Type: Basic Auth, and in fields Username and Password paste you client_id and client_secret, as we did in the screenshot below.6) ebay_site_id:Each eBay site maps to a unique eBay global ID. You can get it fromhttps://developer.ebay.com/devzone/merchandising/docs/concepts/siteidtoglobalid.html. If you don't set this parameter, it will be 0 (US) by default.