Need help setting up TAP for NFT transfer

I have minted NFTs using Tokenization feature and I need to transfer them between different accounts. When I withdraw, I get “blocked by policy” error.

Therefore, I am trying to setup the TAP to allow this transfer but I get ““message”: “Request failed with status code 500”,”. I have been following documentation to setup the rules. I have the request body like this at the moment:

{
    "rules": [
        {
            "operators": {
                "wildcard": "*"
            },
            "type": "TRANSFER",
            "action": "ALLOW",
            "src": {
                "ids": [["*"]]
            },
            "dst": {
                "ids": [["*"]]
            },
            "amountCurrency": "USD",
            "amountScope": "SINGLE_TX",
            "transactionType": "TRANSFER",
            "asset": "*",
            "dstAddressType": "*",
            "amount": "0",
            "periodSec": 40,
            "applyForApprove": true,
            "applyForTypedMessage": true
        }
    ]
}

I need help in correction of this policy or kindly share an existing draft that I can use. Thank you

Hi @taimoor !

Your JSON looks correct except for a couple of details:

  • As the rule will be for NFT transactions, there’s no need to include the applyForTypedMessage key:value
  • To allow the rule to be applied to NFTs, you should include the "allowedAssetTypes": "NFT" key:value.

In case you run into further issues, please share the first four digits of your API keys and we’ll dive into our backend logs.

And here’s the full JSON for your convenience:

{
    "rules": [
        {
            "operators": {
                "wildcard": "*"
            },
            "type": "TRANSFER",
            "action": "ALLOW",
            "src": {
                "ids": [
                    [
                        "*"
                    ]
                ]
            },
            "dst": {
                "ids": [
                    [
                        "*"
                    ]
                ]
            },
            "amountCurrency": "USD",
            "amountScope": "SINGLE_TX",
            "transactionType": "TRANSFER",
            "asset": "*",
            "dstAddressType": "*",
            "amount": "0",
            "periodSec": 0,
            "applyForApprove": true,
            "allowedAssetTypes": "NFT"
        }
    ]
}

Hi @yoji. I tried your JSON but I am still getting the same error.

The first four letters of API key are : 3089

Apologies for the confusion here–editing the TAP is not enabled in Sandbox workspaces. Nonetheless, I see you’ve figured out how to work around this by initiating the withdrawals/transfers via contract calls!

Hi @yoji Yes. I can do that using contract call.

I need help on deploying the ERC721 proxy contract now. Kindly take a look at this issue: Need help in deploying ERC-721F with template id: 8321416b-682d-4557-99d8-8eb61829f6ba using API

Thank you