The Token OS API is built using RESTful architecture and JSON data format, and utilizes HTTP status codes to indicate success or failure of requests. This documentation provides a clear overview of the API's features and functionality, instructions for use with sample code snippets, common use cases and limitations, and troubleshooting tips.
An Open API specification is available upon request.
The Token OS API can syncronize any in-app point attribution system with an on-chain fungible token. In particular, through the API you can:
- Airdrop on-chain fungible tokens to a user's wallet based on the number of in-app points they have earned
- Credit in-app points to a user based on how many on-chain fungible tokens they transferred to a wallet
- Create dynamic conversion rates between in-app points and on-chain fungible tokens
Gold Rush, an iOS mobile game where users mine gold by solving quests and mint Gold Coins with the gold they've mined. With Gold Coins, players can purchase tools that allow them to mine gold faster. Gold Rush wants to allow users to export their Gold Coins on the blockchain for third-party trading purposes.
- They want a full web2 experience: in particular they don't want their players to have to create or connect a wallet and pay gas fees.
- They want their internal Gold Coins to be redeemed for on-chain Gold Tokens as ERC20 tokens on the Ethereum blockchain at a 10 for 1 rate.
- Every time a player earns a Gold Coin on the app, they want Gold Tokens to be airdropped on the associated wallet on the blockchain.
- Every time a Gold Token holder deposits tokens to a Gold Rush-controlled address, they want to credit Gold Coins to the associated account on the app.
BrainFried Studios, a D2C streetwear brand has an existing customer loyalty program. For every 100$ purchased on their e-shop, they credit the consumer with 10 Fried points. Customers can redeem 100 Fried Points for a 10% voucher on all purchase below $1,000. BrainFried wants to export their Fried Points to the blockchain in order to acquire more clients.
- They want a full web2 experience: in particular they don't want their consumers to have to create or connect a wallet and pay gas fees.
- They want the customer to stay on their website during the whole experience
- They want Fried points to be redeemed for on-chain Fried Tokens as ERC20 tokens on the Ethereum blockchain at a 1 for 1 rate
- Every time a player earns a Fried point on the app, they want Fried Tokens to be airdropped on the associated wallet on the blockchain.
- Every time a Fried Token holder deposits tokens to a BrainFried-controlled address, they want to credit Fried points to the associated account on the app.