Udostępnij za pośrednictwem


Why my Trade Me application can't update the watch list?

Shame on me for not reading the API documentation. In my defense, I didn't have much time anyway! (Will keep using this excuse until the end of the days) :)

If you downloaded my sample application, you found that my request token URL was looking like this:

public static string RequestToken = "https://secure.trademe.co.nz/Oauth/RequestToken";

It turns out that, by default, this URL won't request for writing access to anything. So you will keep getting errors every time you attempt to update the watch list unless you change this URL into something like this:

public static string RequestToken = "https://secure.trademe.co.nz/Oauth/RequestToken?scope=MyTradeMeWrite,MyTradeMeRead,BiddingAndBuying";

Where did I learn about this stuff? Good and old API documentation! https://developer.trademe.co.nz/api-documentation/authentication-methods/request-token/

You will notice that once you authenticate, you'll be able to see what permissions this app is requesting from TradeMe:

 

There you go, have fun!

Comments

  • Anonymous
    October 12, 2010
    Thanks, that's awesome.