Registering to Use the API


Getting everything set up to start using the eBay API can be a bit complex. The process has numerous steps and requires at least two separate accounts (one for the development sandbox, and a regular eBay account). I don't usually like to outline the registration process in too much detail because things change, but I have made an exception in this case because I (as well as a few associates I had try the process) ran into some difficulties.

Understanding What Is Required

Developing for the API with an individual (free) account requires at least four separate accounts:

  • A regular eBay.com account that will be associated with your development account

  • A development account, which is a free account required to access the API

  • At least one sandbox user account to act as a seller for auctions you create during testing

  • At least one sandbox user account to act as a buyer for auctions you create during testing

The sandbox user accounts (discussed later) can all come from the same pool (for example, during different tests various accounts can be used for bidding or selling), but you will need at least two accounts; you can't bid on your own items. The first account (the regular eBay account) is only required when you select the Individual (or free) tier. If you have selected another tier (at print time, the cheapest commercial tier is US $500), you will not be required to associate your account with a regular eBay account.

Registering with eBay.com

If you don't already have an eBay account (and you intend to use the Individual tier for API registration), you will need to register for one first. You can do this through the normal www.ebay.com interface, and the steps are self-explanatory. You must use a real email address because there are validation steps.

Creating Your Development Account

Head over to http://developer.ebay.com/join and click the rather prominently displayed Join Now button.

Membership Tiers

The eBay API offers several membership tiers, and these tiers offer you varying levels of support and query limits. The Individual tier is free, and offers you 5,000 queries per month. Unless you are going to require eBay's support while developing your application, I would recommend starting at this level and upgrading if your situation warrants it. If you do need help while developing your application, there are already numerous online communities with forums and mailing lists.

Username

Your development username must be different than your regular eBay username, and must contain at least one letter and at least one number (I ended up appending a 1 to my username).

Other Fields

The rest of the form is pretty standard; as usual, choose a secure password.

Note 

Password Safe is a great tool to store all of your various login information. You can get it at http://sourceforge.net/passwordsafe.

License Agreement

After entering your information, you will be presented with some details regarding the membership tier you selected, as well as the opportunity to create a regular (nondeveloper) eBay account. Scroll down, read the license agreement (in the unnecessarily small box), and if you agree, check the box and continue. If not, you can skip the rest of this chapter.

Check Your Email

You should promptly receive an email from eBay, welcoming you to the developer program. This kind of email is often ignored, but in this case, don't ignore it. The email, though given a welcoming subject, is your email verification notice and is absolutely necessary. Click the link in the email, log into the developer sandbox (with your developer credentials), and on the new form enter your regular user credentials and the confirmation code from the email. You will then be provided with three key/value pairs that should look something like this:

 DevID = C481VH1E49RGK2J21C5H96R143H641 AppID = WROXP91H134FC2I9R276TB6J6945CT CertID = P76S15991C6$HFI91JM21-Y7F7V7RD 

Save those values in a safe place. You will need them to acquire request tokens later, and they can also be a pain to recover.

Create a Sandbox Account

This is where the fun really starts. There are two facets to accessing the API, the first being your development account (which you have already created) and the second being a nondevelopment account to which the requests will be attributed (in this case this will be a sandbox account, but the process for using a regular account is identical). Generally (when you develop an application and allow others to use it to perform actions under their own account), you will provide users with a link to a page hosted at eBay, as well as the three tokens you just received. By doing things in this manner, the users' credentials are never presented to you, and users require your tokens in order to access the API (remember that there are query limits associated with your account, so you don't want nonclients running up the total).

You need to head over to www.sandbox.ebay.com/ and register a user account, preferably two (one to act as a buyer, and the other as a seller) to test your applications fully.

Alternatively, you can use eBay's Sandbox User Registration Tool to quickly generate accounts without jumping through all the hoops normally associated with creating an account; you can access this tool at http://developer.ebay.com/DevZone/sandboxuser.asp. Using this tool also lets you pre-set the account's feedback score and back-date the user's creation.

Generating Authentication Tokens

The fun of generating all your credentials has just gotten started. Next, head over to http://developer.ebay.com/tokentool/ and enter the three values you received while creating your development account. In this case you will want to generate your tokens for the sandbox; also make sure you check the box to generate REST keys. Once you have entered your three values, you will need to enter your User Sandbox Account information. You should then be provided with two tokens, along with the presentation of your username:

 User: wroxuser Token: AgAAAA**AQAAAA**aAAAAA**S0XcQg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+lCpaDpQ+dj6x9nY+ seQ**WVQAAA**AAMAAA**mVU/W1cVxRscpy4SAd3Ou9urcp9z08pOzBXIdf2KlOThmHVKptfdyftAk4Us1d CDt2J4xT5Jpm+ZjTnMZX32EWA45oMxTJZxFTgQ4D7QQyCYJ0f2QHipmxdnDYF6r92yfMflF8YTrTNUSN8Dc yJcN6GlHU8jsoZyn93v7KVhy9NMNIs6WO60qXOxg8ZpwuliQWo745ZBrVGCtg9lxDFfFQr+anSPoLSPkSKU QOZ7W6zSkpD/fQ8iZewjCz571lBfMfoN+1u++nLURmHq9PfqXAlVbWMtWz5st6GNVcJDvRQ1ETk+zaFEBft zwBeG0gcUXLUrrX5/P+13Iq4lFYI80lFHX9xiR5S16ayT7csnryIPKIuS6BkKDLyVC0CRWEkwsdmSt9+VmI Jk/kw7HbqLD5DPkzsab1ifn2yKUxcn7/Jcqs+x/PqCXpOPs8+aTy6cAifeOskwZ/Y2iZJGqt/U+K88HJy8s 5QLpDfnkNheQykS6cTiQ4/fAqPmwolFYnqshvZ3bbA6C0erg2ejIB/sVo1Wucov1Z18CdroQWwb19QaTP6U pFYfjEhaWx7W1T6fP9oRfJu5XKa7uOEHKdQbYnKNR+bSeuZhfK1GaGwp6ECZnt9bCsSX3dJRd65AKDUPU4F GTb4baSsBH/bwz66PiQIbOVNHtrWK4fh6o64/ymFDJjVFPYFINC758SupZs7Q7G6FxXs2ViVv3nFEOa8b6M lEr0wq9v2Hs+GFcwSkpecAESdQykuXAkQIYylVd0iS REST Token: oVAr7OhSbdw%3D**%2Bs1d4ta8quAac9G3rvTuhs8IPvg%3D 

The REST token is obviously used with REST requests (where the request size is limited), and the regular token is used with SOAP requests. Store them both in a safe place.

Congratulations! You've created two or three accounts with secure passwords, and received five tokens. You're either well on your way to making your first eBay API call, or a you're on your way to a headache.




Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
ISBN: 764589547
EAN: N/A
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net