Title: 796.com API woes. What do i do wrong? Post by: johnny211 on January 18, 2014, 08:24:37 AM Hi all, does anybody have authenticated parts of the 796.com API working? Or maybe even actual sample code? I am trying to make a script to regularly fetch my positions and balances.
Getting an access token works fine: Code: In [2]: url I suspect the last version is the correct one (unquoted). Anyway, I'm unable to figure out how to actually use these tokens, all my attempts so far has led to a singular result: # sligthtly edited for security In [25]: print q1 12345|Oj2EBShZ..............................................sa/x68Q+oFwiOkD4USdQ In [26]: requests.get('https://796.com/v1/user/get_info?%s' % q1) Out[26]: <Response [200]> In [27]: _.text Out[27]: u'Access Denied!' In [28]: requests.get('https://796.com/v1/user/get_info?access_token=%s' % q1) Out[28]: <Response [200]> In [29]: _.text Out[29]: u'Access Denied!' Hoping for ideas! Thanks! UPDATE: It boils to me not understanding oauth at all. Anyways, I do receive two fields separated by a pipe in the data.access_token response object. First field is same as APP ID and the other one i guuess i the secret token. I'm trying this with python 2.7 rauth, still looking for that correct magic incantation. Title: Re: 796.com API woes. What do i do wrong? Post by: 796 on February 12, 2014, 07:28:33 AM Hi there,
The api has been fixed, please check it out. Best, 796 Exchange |