API GET Authentication Method

Asked

Viewed 37 times

1

good night, I’m having trouble getting a GET Method with Authentication to work I have read the Documentation and installed the SDK in the Intellij IDEA of an Exchange API and am having difficulty getting the code below to work inserir a descrição da imagem aqui

I know I should give some specific parameters like Key Api and Secret Key but what I don’t understand is this Method executeRequest(request) because the SDK I downloaded does not have this method... Can someone give me a clue how to solve this?

An API Documenting Feature that deals with this call: https://doc.novadax.com/pt-BR/#communication-with-a-api

*Authentication Method Steps to authenticate a GET request

  1. Query string is queryStr = "name=joao&cpf=123456&Birthday=2017-08-01"
  2. Encode the query string and sort parameters by following the ASCII order. Sort(urlencode(queryStr)) // Birthday=2017-08-01&Cpf=123456&name=Joao
  3. Transform the string with format {request method} n{request path} n{string to be encoded} n{timestamp} signStr = GET n/v1/Orders/get nbirthday=2017-08-01&Cpf=123456&name=Joao n1564988445199
  4. Use the generated string in step 3 and its "Secretkey" to authenticate your request Sign = hmac_sha256(signStr,Secretkey)
  5. Add Accesskey, Signature and Timestamp to the request header (header). request.header.add("X-Nova-Access-Key",Accesskey) request.header.add("X-Nova-Signature",Sign) request.header.add("X-Nova-Timestamp",Timestamp)*
  • Please replace the image with text code, this in the rules of the site not to use code as image.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.