Are there function for automatic dispensing?

In my application, I create an asset and then I create accounts. Accounts use only my own asset (accounts transfer the assets to each other). But for transferring assets to each other, accounts both need an algod for paying the transaction fee. For having algods, each account needs to dispense algod. Is there any function programmatically which does dispensing? So that, I will not need to enter to the link (https://dispenser.testnet.aws.algodev.network/ or https://bank.testnet.algorand.network/) for dispensing. Because I cannot dispense by entering a link all the time when I create a new account. Or can I use my own assets as a transaction fee, so I will not need the algods.

Just use the above dispenser to move Algos to an account of yours.
And then dispense from this account (using a hardcoded mnemonic)

Please do not abuse the dispenser and only use as little Algos as possible.
If you need more than 1000 Algos, please contact me.

So you mean:

  1. I create an account,
  2. Then I dispense algos from the above links
  3. After that, I create other accounts.
  4. And then whenever I create new accounts I transfer algos from my own account to the other accounts.
    Did I understand correctly?

Yes, the above should work.

But recipient also spends 0.001 algos for transaction fee. If the recipient doesn’t have any algos, how asset transfering will happen?

To receive an asset, an account needs anyway to be opted in.
In particular, this means that they must have at least 0.2 Algos at all time.
You can dispense these 0.2 Algos as well as the extra needed fees for the future from your first account (for which you got Algos via the dispenser).

These 0.2 min balance Algos are necessary in all cases.
That being said, sometimes you may not want to have to pay on top of that transaction fees from the asset holder.
If that’s the case you have two choices depending on what your exact dApp is:

  1. Use the clawback account to transfer assets. The clawback accounts will pay for the fees. You may use smart signatures for advanced patterns of authorization.
  2. Make an asset transfer a group of two transactions:
    a. A 0-Algo transaction from an account with a lot of Algos to itself, paying a 0.002 Algo fee (hence paying for the second transaction because of fee pooling).
    b. The actual asset transaction with a 0 Algo fee.