Bitcoin Forum
December 11, 2019, 07:52:55 PM *
News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Cryptsy API help  (Read 424 times)
TYDIRocks
Full Member
***
Offline Offline

Activity: 216
Merit: 100


View Profile
August 04, 2015, 08:59:03 PM
 #1

Hey guys,

I'm trying to use the Cryptsy API and everything seems to be working except for the methods that require authentication...

Here is my current code: https://gist.github.com/anonymous/8c128bdab19b44eec2f7

Yet everytime I receive this response: {"success":false,"error":["Must be authenticated"]}

Can someone please help me, I cannot for the life of me figure out what I'm doing wrong.

Import new address/private keys with ease: https://bitcointalk.org/index.php?topic=101161
1576093975
Hero Member
*
Offline Offline

Posts: 1576093975

View Profile Personal Message (Offline)

Ignore
1576093975
Reply with quote  #2

1576093975
Report to moderator
Best ratesfor crypto
EXCHANGE
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1576093975
Hero Member
*
Offline Offline

Posts: 1576093975

View Profile Personal Message (Offline)

Ignore
1576093975
Reply with quote  #2

1576093975
Report to moderator
hexafraction
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
August 04, 2015, 11:44:05 PM
 #2

Please also show the code of generateHMAC, with any private API keys removed/replaced with placeholders.

Edit: I dug up some old code. Here's how I've been doing it:

https://gist.github.com/hexafraction/83ffdf08ed7b44d004b9

In order to construct the parameter 'data', I've been creating a POST parameter string by way of String.format:

Code:
String params = String.format("foo=%s&bar=%s&number=%d", valOfFoo, valOfBar, System.currentTimeMillis());

This ensures that the parameters are in the same order as would be expected with HMAC.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
TYDIRocks
Full Member
***
Offline Offline

Activity: 216
Merit: 100


View Profile
August 05, 2015, 02:20:14 AM
 #3

I'm not sure if that's correct. This is my hmac function: https://gist.github.com/anonymous/23f2597b19da01f36297

And, for example, this is what it returns: Br7UX6pke+gzxmEP8HUFXzNuIqPJlU+qfqMZiXeJ7N3oZ+fynQZ3g1D12nxNHFZDo0KWZZZ+Qxy4K7+OlUHBFw==

I don't think I need to change it into hexadecimal, I tried using your function and I get the same error.

Import new address/private keys with ease: https://bitcointalk.org/index.php?topic=101161
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!