Skytale API Specification

The Skytale API

We provide live documentation to test our API in a sandbox to be safely integrated without compromising any sensitive data. Our API is equipped by an SDK written in the most popular languages and CLI to make developer life easier.

Access and Authorization

You can access our API by generating a magic.link token and then use that token to obtain a Skytale JWT token.

In order to do so, you will need to request magic.link Skytale magic.link public key.

  1. with the Skytale public API key, generate your token following the instruction in magic.link docs.
  2. once you have obtained the magic.link token, use it to call the login in Skytale and passing the token in the X-Magic-Did-Token
curl --location --request POST 'https://api.skytale.finance/api/1/login' \
--header 'X-Magic-Did-Token: <magic-link-token-here>'
  1. you will receive a new JWT token from the login
{
    "jwtToken": "<skytale-jwt-token>"
}
  1. use the JWT token as Authorization: Bearer token to access the Skytale API
curl --location --request GET 'https://api-dev.skytale.finance/api/1/user' \
--header 'Authorization: Bearer <skytale-jwt-token>'

Metamask

You can gain access to Skytale API by signing a request for access via Metamask with your account.

  1. request a text to be signed from the Skytale API passing the public address of the account you want to use for logging in
curl --request GET 'https://api-dev.skytale.finance/api/1/metamask/nonce/<your-public-address-here>'

you will receive the following response

{
    "nonce": <nonce-value>,
    "message": "Welcome to Skytale!\n\n    By Clicking on Sign, you accept the Skytale Terms of Service: https://web.skytale.finance/docs/Skytale_Terms_&_Conditions.pdf\n    \n    This request will not trigger a blockchain transaction or cost any gas fees.\n    \n    Wallet address:\n    <your-public-address>\n    \n    Nonce:<nonce-value>",
    "publicAddress": "<your-public-address>"
}
  1. sign with Metamask the received text and post the signature to Skytale API, with the name of the chain used to sign the message and the nonce
curl --request POST 'https://api-dev.skytale.finance/api/1/metamask/login' \
  --data-raw '{"nonce":1244,"signature":"<metamask-signature-here>","walletAddress":"<your-public-address-here>","chain":"<chain-name-here>"}' \
  1. you will receive a new JWT token from the login
{
    "jwtToken": "<skytale-jwt-token>"
}
  1. use the JWT token as Authorization: Bearer token to access the Skytale API
curl --location --request GET 'https://api-dev.skytale.finance/api/1/user' \
--header 'Authorization: Bearer <skytale-jwt-token>'
  1. the public address that you used for signing will appear in your wallet list.

results matching ""

    No results matching ""