coin.mx : 403 forbidden error on my web request

0 votes

I have been trying to make a query to the coin.mx site in a C# app, and I keep getting a 403 forbidden error. Their example uses python:

base64.b64encode(str(HMAC(YOUR_SECRET, PATH+'?'+S, sha512).digest())),

where PATH is a http path (e.x. "/api/v2/trader/info")

given my secret is a hex string of the form "d1e2a3d4", I calculate my signature as follows:

HMACSHA512 mHasher512 = new HMACSHA512(secret);
var path = "/api/v2/trader/info?nonce=123"
var msg = Encoding.ASCII.GetBytes( path );
var hash = mHasher512.ComputeHash(msg);
var hashb64 = Convert.ToBase64String(hash);
return hashb64;
Sep 11, 2018 in Blockchain by slayer
• 29,170 points
42 views

1 answer to this question.

0 votes

I was having the same issue and found this question while searching for a solution. I finally fixed the problem by removing ? in the path string. Try changing your path variable as follows (this is just for getting the hash string, the GET request still needs the ? of course).

var path = "/api/v2/trader/infononce=123"
answered Sep 11, 2018 by digger
• 26,550 points

Related Questions In Blockchain

0 votes
1 answer

How can I deploy a HelloWorld contract on my testrpc network?

The problem lies in the command: truffle migrate Your truffle migrate command ...READ MORE

answered Apr 27, 2018 in Blockchain by Perry
• 17,020 points

edited Aug 10, 2018 by Omkar 506 views
0 votes
1 answer
0 votes
1 answer

How to make my Dapp work on regular browsers?

There are ethereum supporting browsers like Metamask, ...READ MORE

answered Jun 20, 2018 in Blockchain by ariaholic
• 7,340 points
42 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
89 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
169 views
0 votes
1 answer
0 votes
1 answer

403 forbidden error coinbase api

I had a similiar issue connecting this API, ...READ MORE

answered Aug 28, 2018 in Blockchain by digger
• 26,550 points
459 views
0 votes
1 answer

How to make POST request on C# to blockr.io

By default UploadValues doesn't format the data ...READ MORE

answered Aug 30, 2018 in Blockchain by digger
• 26,550 points
523 views