Fill in the form, the only important thing is the “Your auth accepted URL“, it should be under your domain. (You should able to extract the auth code from the call back later, for example $_GET[‘code’] in PHP), let’s assume this https://yourdomain.com/accept.php

Take down the value of “RuName (eBay Redirect URL name)” and “Your branded eBay Production Sign In (OAuth)“

So far, we’ve done our preparation at developer.ebay.com

Then, on you local developing environment or you production server,:

Set user login you own website

put a hyperlink pointing to the URL of “Your branded eBay Production Sign In (OAuth)“

visitor click on that link, and login with their ebay account.

ebay will make a callback redirect to “Your auth accepted URL” if success.

On the “Your auth accepted URL“, prepare a PHP script that get the value of $_GET[‘code’] and save it in sessions. It starts with ‘v%5E1’. this is called “Authorization Code”

<B64-encoded-oauth-credentials>: Use a Chrome Browser, Right click, Inspect, Console
Then type: btoa(‘APP_ID:CERT_ID‘);
We did take down these two values earlier. and there is a : between.
Hit ENTER, the value inside the double quotes is <B64-encoded-oauth-credentials>

<authorization-code>: the ‘Authorization Code‘ we got in the callback redirect.

<redirect_URI>: This is the tricky part. This can’t be ignored or filled with random things, it’s the value of “RuName (eBay Redirect URL name)”

Send the request, and you’ll get the access token and the refresh token.
Follow the official guide to refresh the token if expired.

We are basically finished here, If you wanna call an API, ‘List orders as a seller’ for instance:

Important: Double check your operate system: ONLY Debian 8 (Jessie) works with this instruction Apache version: 2.4 which is the default version comes with Debian 8 (Not working with Apache 2.2 or lower) Install Apache2: Read more…