Skytale API

A secure and seamless API to manage all your corporate digital assets in one place. Contact us at [email protected]


Powered by CoinGecko and Covalent

To access the API, you need either a magic.link token or you need to sign with Metamask.

The expiration time for the returned JWT is 24 hours. After that you need to login again.

Magik Link

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 pk_live_E71ED45CC455F741, generate your X-Magic-Did-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: <X-Magic-Did-Token>'
  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":<nonce-value-here>,"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.