666lcz/knowledge_base
0
1---2title: Requesting Gas Tokens from Faucet3---4 5Sui faucet is a helpful tool where Sui developers can get free test SUI tokens to deploy and interact with their programs on Sui's Devnet and Testnet networks. There is no faucet for Sui Mainnet.6 7## Prerequisites8 9To request tokens from the faucet, you must own a wallet address that can receive the SUI tokens. You can generate an address via the [Sui CLI tool](../build/cli-client.md#active-address) or the [Sui wallet](https://github.com/MystenLabs/mysten-app-docs/blob/main/mysten-sui-wallet.md).10 11## 1. Request test tokens through Discord12 131. Join [Discord](https://discord.gg/sui).14 If you try to join the Sui Discord channel using a newly created Discord account, you may need to wait a few days for validation.151. Request test SUI tokens in the Sui [#devnet-faucet](https://discord.com/channels/916379725201563759/971488439931392130) or [#testnet-faucet](https://discord.com/channels/916379725201563759/1037811694564560966) Discord channels. Send the following message to the channel with your client address:16 `!faucet <Your client address>`17 18## 2. Request test tokens through wallet19 20You can request test tokens within [Sui Wallet](https://github.com/MystenLabs/mysten-app-docs/blob/main/mysten-sui-wallet.md#add-sui-tokens-to-your-sui-wallet).21 22## 3. Request test tokens through cURL23 24Use the following cURL command to request tokens directly from the faucet server:25 26```27curl --location --request POST 'https://faucet.devnet.sui.io/gas' \28--header 'Content-Type: application/json' \29--data-raw '{30 "FixedAmountRequest": {31 "recipient": "<YOUR SUI ADDRESS>"32 }33}'34```35 36Replace `'https://faucet.devnet.sui.io/gas'` with `http://127.0.0.1:5003/gas` when working with a local network.37 38## 4. Request test tokens through TypeScript SDK39 40You can also access the faucet through the TS-SDK.41 42```typescript43import { requestSuiFromFaucetV0, getFaucetHost } from '@mysten/sui.js/faucet';44 45// get tokens from the Devnet faucet server46await requestSuiFromFaucetV0({47 // connect to Devnet48 host: getFaucetHost('devnet'),49 recipient: '<YOUR SUI ADDRESS>',50});51```52 