Title: Accessing MT Gox API from Java Post by: ravenlord on June 13, 2011, 07:37:14 PM Hi there,
I currently try to access the MT Gox API from a Java-Tool. No matter which code I use, it always results in a "{"error":"Not logged in."}" error. Therefore I hope, that you can help me... I think, the following code should result in a correct POST-Request. _url = https://mtgox.com:443/code/getFunds.php _postcontent = name=blah&pass=blah Code: urlConnection = (HttpsURLConnection) (new URL(_url).openConnection()); I would be very happy, if somebody could help me out of this! Thanks a lot. Title: Re: Accessing MT Gox API from Java Post by: vrotaru on June 14, 2011, 04:25:35 AM "POST" or "GET"? I was only reading their ticker from JAVA, and it worked with "GET"
Code: String tickerURL = "https://mtgox.com/code/ticker.php"; Title: Re: Accessing MT Gox API from Java Post by: ravenlord on June 14, 2011, 07:29:31 PM MtGox requires POST requests for all API-Actions, which need a login. Only the three open action can be performed with a get-Request.
Title: Re: Accessing MT Gox API from Java Post by: holgero on July 03, 2011, 01:18:13 PM This works for me:
Code: final URL url = new URL("https://mtgox.com/code/getFunds.php"); Did you forget to URLEncode your username and password? Or is the typo where you set the "Content-Type" to Code: "application/x-www- form-urlencoded" |