Website logo

Testing your app

Sandbox Environment

The Trade Me sandbox environment is a completely independent copy of the Trade Me website, API and database. It is designed to allow you to test potentially destructive API operations in a safe environment.

To use it, simply replace any "trademe.co.nz" URL with "tmsandbox.co.nz". For example, to get the list of regions via the sandbox environment, use the following URL: https://api.tmsandbox.co.nz/v1/TmAreas.xml

The main sandbox website is: https://www.tmsandbox.co.nz. Feel free to create auctions, bid on existing auctions, whatever! Don't worry, no money will change hands and you won't be obligated to complete any sale.

Differences between sandbox and live environments:

Request Builder

Every reference page on this site has a request builder tool to allow you to construct API requests on-the-fly. This tool operates against the sandbox, so you'll only see fake data when using this tool. On the plus side you don't have to worry about accidentally buying a gold-studded toenail clipper!

Credit card payments

When making credit card payments on the sandbox site, use this card number: 4111111111111111. Cardholder name, expiry date and CVV can be anything, as long as what you enter meets the validation requirements (expiry date in the future, 3 or 4 digit CVV, etc).

OAuth

If you register an app in sandbox, then the registration details (consumer key, etc) are only valid when communicating with api.tmsandbox.co.nz. Similarly, access tokens that are generated in the sandbox environment are only valid within the sandbox environment. If you try to use an access token that was generated from sandbox in our production environment (or vice-versa), you will get a HTTP 401 error.