Choosing your network

Get familiar with the URLs to choose depending on the network your token is deployed on

This documentation has been written using the Ropsten test network of the Ethereum blockchain, but depending on the blockchain you chose when subscribing to Tokeny, you might need to change this configuration. Follow this simple table to understand which URL you need to use, depending on the network your token has been emitted on:

NetworkSubnetworkServicing API Base URLT-REX Factory API Base URLethereumNetwork valueExplorer
PolygonMumbai (testnet)servicing-api-staging.tokeny.comtrex-factory-api-staging.tokeny.comMUMBAIhttps://mumbai.polygonscan.com/
EthereumHomestead (mainnet)servicing-api.tokeny.comtrex-factory-api.tokeny.comMAINNEThttps://etherscan.io/
PolygonMumbai (testnet)servicing-api-testing.tokeny.comtrex-factory-api-testing.tokeny.comMUMBAIhttps://mumbai.polygonscan.com/
PolygonPolygon (mainnet)servicing-api-polygon.tokeny.comtrex-factory-api-polygon.tokeny.comMATIChttps://polygonscan.com/

For example, if you want to mint tokens on the Ethereum mainnet, use this endpoint:

curl 'https://servicing-api.tokeny.com/api/tokens/:token_id/actions/mint/batch' \
  -H 'authorization: Bearer <jwt>' \
  -H 'content-type: application/json' \
  --data-binary '{
   "ethereumNetwork":"MAINNET",
   "transactions":[
      {
         "address":"<receiver_wallet>",
         "amount":"<amount_ok_tokens>"
      }
   ]
}' \
  --compressed

If you want to do the same operation on the Polygon mainnet, use this configuration instead:

curl 'https://servicing-api-polygon.tokeny.com/api/tokens/:token_id/actions/mint/batch' \
  -H 'authorization: Bearer <jwt>' \
  -H 'content-type: application/json' \
  --data-binary '{
   "ethereumNetwork":"MATIC",
   "transactions":[
      {
         "address":"<receiver_wallet>",
         "amount":"<amount_ok_tokens>"
      }
   ]
}' \
  --compressed