user20793: I'm having trouble following LakeBTC's API instructions for connecting to their API via Python.
API Documentation:
https://www.lakebtc.com/s/api
I have my key (email address) and secret. I'm using the API URL: https://www.LakeBTC.com/api_v1
No matter what I try, I get a 401 Error. Below is my code, any ideas?
tonce = str(int(time.time() * 1e6))

p = 'tonce=' + tonce \
    + '&accesskey=' + self.key \
    + '&requestmethod=post' \
    + '&id=1' \
    + '&method=' + 'getAccountInfo' \
    + '&params='

# Create signature
hmac_obj = hmac.new(self.secret, p, hashlib.sha1)

b64 = 'Basic ' + base64.b64encode(self.key + ':' + hmac_obj.digest())

header = {
    'Json-Rpc-Tonce': tonce,
    'Authorization': b64,
    'content-type': 'application/json-rpc',
}

response = requests.post(self.apiUrl, data=p, headers=header)

Am I encrypting and hashing correctly?

user2306: I think I figured out your problem. (Or, one of them, at least.)

Step 6: POST params data in JSON format to this url:
https://www.LakeBTC.com/api_v1

You're not POSTing the the right information; you're POSTing the entire signature.
response = requests.post(self.apiUrl, data=p, headers=header)

Should be something along the lines of:
response = requests.post(self.apiUrl, data=json.dumps(
    {
        "method": method,
        "params":",".join(params),
        "id": 1,
    }, headers=header)


user20866: A closer look at their API page, you will find LakeBTC has provided a simple code for Python: https://github.com/LakeBTC/lakebtc_python 
And others Sample Code you can find here: https://www.lakebtc.com/s/api include PHP, Node.JS, Ruby and Python, maybe will more Code in the future :)

20793: <p>I'm having trouble following LakeBTC's API instructions for connecting to their API via Python.</p>

<p>API Documentation:
<a href="https://www.lakebtc.com/s/api" rel="nofollow">https://www.lakebtc.com/s/api</a></p>

<p>I have my key (email address) and secret. I'm using the API URL: <a href="https://www.LakeBTC.com/api_v1" rel="nofollow">https://www.LakeBTC.com/api_v1</a></p>

<p>No matter what I try, I get a 401 Error. Below is my code, any ideas?</p>

<pre><code>tonce = str(int(time.time() * 1e6))

p = 'tonce=' + tonce \
    + '&amp;accesskey=' + self.key \
    + '&amp;requestmethod=post' \
    + '&amp;id=1' \
    + '&amp;method=' + 'getAccountInfo' \
    + '&amp;params='

# Create signature
hmac_obj = hmac.new(self.secret, p, hashlib.sha1)

b64 = 'Basic ' + base64.b64encode(self.key + ':' + hmac_obj.digest())

header = {
    'Json-Rpc-Tonce': tonce,
    'Authorization': b64,
    'content-type': 'application/json-rpc',
}

response = requests.post(self.apiUrl, data=p, headers=header)
</code></pre>

<p>Am I encrypting and hashing correctly?</p>
 2306: <p>I think I figured out your problem. (Or, one of them, at least.)</p>

<blockquote>
  <p>Step 6: POST params data in JSON format to this url:<br>
  <a href="https://www.LakeBTC.com/api_v1" rel="nofollow">https://www.LakeBTC.com/api_v1</a></p>
</blockquote>

<p>You're not POSTing the the right information; you're POSTing the entire signature.</p>

<pre><code>response = requests.post(self.apiUrl, data=p, headers=header)
</code></pre>

<p>Should be something along the lines of:</p>

<pre><code>response = requests.post(self.apiUrl, data=json.dumps(
    {
        "method": method,
        "params":",".join(params),
        "id": 1,
    }, headers=header)
</code></pre>
 20866: <p>A closer look at their API page, you will find LakeBTC has provided a simple code for Python: <a href="https://github.com/LakeBTC/lakebtc_python" rel="nofollow">https://github.com/LakeBTC/lakebtc_python</a> </p>

<p>And others Sample Code you can find here: <a href="https://www.lakebtc.com/s/api" rel="nofollow">https://www.lakebtc.com/s/api</a> include PHP, Node.JS, Ruby and Python, maybe will more Code in the future :)</p>
