Private API Calls

After you performed all steps in Registration Flow and Authentication Flow you can generate JWT token:

  1. User creates a ECDSA signature with Ethereum Wallet

  2. Call this endpoint (passing Ethereum Address, signature and sign message).

  3. Dexilon API check ownership of your Ethereum Wallet and get Dexilon Chain Address cause mapping has been created already.

  4. Returns Access and Refresh JWT Tokens

  5. To refresh current Access JWT Token use this endpoint

After you got valid Access JWT Token you can call private API methods. All private methods requires two request headers:

  1. Authorization = "Bearer <AccessJWT Token>"

  2. CosmosAddress = "<granter Dexilon Chain Address>"

Example of calling private API method:

curl --header "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI1IiwiaXNzIjoiY29zbW9zMW1qNnl5NDBsOXI2NnZldnhza3FoMHBlZDRjdnh0ZTlleHFuYTJhIiwiZXhwIjoxNjc2MDc4NDQx
fQ.tm3euJjyg9_FiKIaqlOptTtDM1NYae58cKM0Dg7cvV08issl-qXPCZ0n5u16wGhGA5gh0omgu34umDp63
dCRTw" --header "CosmosAddress: cosmos1jsc2y8a6ya9jy4d38mr508uletcxw32r4md2pp" 
-v https://api.staging.dexilon.io/api/v1/accounts

ALL PRIVATE METHODS has πŸ”’ emodji in a name.

Last updated