Post
Topic
Board Announcements (Altcoins)
Re: [ANN][RIC] Riecoin: constellations POW *CPU* HARD FORK successful, world record
by
guytp
on 09/06/2018, 16:17:57 UTC
Do you have an API available?


Yes.  There is no formal how-to documentation but a fairly basic test UI detailing calls.

API itself is self-described at https://zapple.io/exchange/1/_md/index

To call any authenticated call you need to first login by making a call to our authentication API:

PUT https://lts-api.com/auth/1/

Body:
{
  "Username": "XXX",
  "Password": "YYY",
  "TwoFactorAuthenticationCode": null
}

If you have 2FA enabled replace null with your current 2FA code.

In your response will be something like this:

{
"JsonWebToken":"XXXXX",
... other fields
}

Capture the "JsonWebToken" value (XXXXX here) and then in authenticated calls pass it in as authorization header

BEARER XXXXX

Tokens have a validity once issued, you can call a renew endpoint or log back in upon expiry.  You must renew prior to expiry.

What we don't have yet is a single API token that is long-life - so if you have 2FA you'll need to supply the 2FA code when you first start your application and then renew the token every 15 minutes or so.  Dedicated API tokens with long-life are planned.