So I'm trying to test an authenticated response from Gemini. I get a "response", but not what I expect... it comes back as an html string, not "an array of balances" like the API suggests I should get. I haven't used HttpClient before, so double learning curve here. Not sure if I have a bad message, or if I'm looking at the wrong method/property?

I'm a bit stuck as to how to get this array returned from Gemini.

I have the API Key and Secret there as this is just on the sandbox. Account has ~1,000,000 fake assets.

JSON String

{"request":"/v1/balances","nonce":1477275934999}

Base64 Encoding of JSON / Payload

eyJyZXF1ZXN0IjoiL3YxL2JhbGFuY2VzIiwibm9uY2UiOjE0NzcyNzU5MzQ5OTl9

Post Message

Method: POST, RequestUri: 'https://api.sandbox.gemini.com/', Version: 1.1, Content: System.Net.Http.StringContent, Headers: { X-GEMINI-APIKEY: L6qDKmQZcmLVDTd5zK9S X-GEMINI-PAYLOAD: eyJyZXF1ZXN0IjoiL3YxL2JhbGFuY2VzIiwibm9uY2UiOjE0NzcyNzU5MzQ5OTl9 X-GEMINI-SIGNATURE: DBA15C6B2FFA602F9323E0180A14BABEA018640324E313D6C8BBAE9F8872B06325B75F6C507C55435982D600EE5DDF57 Content-Type: text/plain; charset=utf-8 }

Response string: (always seems to 'work', even when I had mal-formed requests I didn't notice for a bit)

StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Connection: keep-alive Age: 6605 X-Cache: Hit from cloudfront X-Amz-Cf-Id: Ae3ps4mhbjIzGCrgFr43dq0ICZvnUmPKpeo1miv4ufDFJkJtNZy8GA== Date: Sat, 22 Oct 2016 22:55:51 GMT ETag: "5dc6bbdccdd2100c4ca4b0155402db35" Server: AmazonS3 Via: 1.1 cae81d5ff1d682b28f2deabdd94777d4.cloudfront.net (CloudFront) Content-Length: 172 Content-Type: text/html Last-Modified: Fri, 29 Jul 2016 18:31:06 GMT }

Response.Content - Not what I expected...

<html> <head> <script> window.location.replace("/rest-api/" + window.location.search + window.location.hash); </script> </head> </html>

Code (C# .NET 4.5)