Using the eBay API Test Tool to Authenticate a User

The "Getting a User Token" section of Chapter 5 discusses a technique for authenticating a user with a series of Web pages. You can find the code for performing this task in the "Modifying the Basic Technique to Perform Authentication" section of Chapter 6. However, it's not always convenient for a developer to authenticate a test user with these techniques. Fortunately, you have an alternative available in the eBay API Test Tool. A special call named GetToken() lets you authenticate a user for testing purposes only. To use this call, you must rely on the special authentication keys discussed on the Getting Started with eBay Authentication and Authorization page at authauth.asp.

To use this technique, open the eBay API Test Tool at DevZone/build-test/test-tool.asp. Select Sandbox mode. Input the authentication keys and provide your test user's name and password. Select GetToken as the request template and click Submit. You'll receive a message containing the token as a response. This is a short-term token that lasts either 10 minutes or 2 hours depending on which set of authentication keys you use. Unlike the real user token created in Chapters 5 and 6, this token isn't escaped—it doesn't include special sequences such as %2F for the / (slash) or %2B for the + (plus sign), so you don't need to worry about any special conversion before using the authentication token.

Ebay Power Sellers Niches

Ebay Power Sellers Niches

Get the private success secrets of 25 eBay Power Sellers, Secrets that they are using every day to make big dollar money from eBay. This is finally your chance to discover... 25 Real Life Examples of Real People Making Good Money on eBay and the Exact Details of How They Run Their eBay Businesses!

Get My Free Ebook

Post a comment