Asset Optin Teal Code

Trying to use following smart contract TEAL code for the App to optin to an asset.
The app is called where the Sender is another account, but the idea is that (1) The App Opts in to Asset A and then directly below it (2) The Sender transfers Y amount of the asset into the App (Escrow)

txna Assets 0 … contains the correct Asset ID which incidentally was created by Sender.

Following fails even if I include the AssetAmount of 0. Some guidance appreciated on how to approach this

itxn_begin
int axfer
itxn_field TypeEnum
global CurrentApplicationAddress
itxn_field AssetSender
global CurrentApplicationAddress
itxn_field AssetReceiver
txna Assets 0
itxn_field XferAsset
itxn_submit

Error:
logic eval error: clawback not allowed: sender WCS6TVPJRBSARHLN2326LRU5BYVJZUKI2VJ53CAWKYYHDE455ZGKANWMGM, clawback W5Z6DXTBYI4R7XJDE352FGYN3QPC6EOIN3ZWG6AVGWFAYXGX2XLPT6CHVI. Details: pc=194, opcodes=txna Assets 0itxn_field XferAssetitxn_submit

AssetSender is for clawback operations.
You want to use Sender.

Actually, since you are using the default application address, you don’t even need to specify Sender.

I got it working as below. I re-read the docs and the reminder (for me) was that for Inner Transactions, the Sender defaults to the Application (Smart Contract) itself. But, when trying to use the AssetSender explicitly, it thinks it is a clawback. So, the below facilitates the Application Optin to an asset.

itxn_begin
int axfer
itxn_field TypeEnum
global CurrentApplicationAddress
itxn_field AssetReceiver
txna Assets 0
itxn_field XferAsset
int 0
itxn_field AssetAmount
itxn_submit