The key and secret for the defender-client packages refers to the Team API key/secret. You can generate a new one by selecting the menu at the top right in the Defender web interface --> Team API Keys. You can assign whatever access rights are necessary on the next screen.
This key would then be saved in your .env file and referred to when instantiating one of the defender-client packages (such as RelayClient).
If you're wanting to send transactions directly using the relayer (such as when using a Relayer to deploy contracts), you can create a new key for the relayer with await relayClient.createKey('[RELAYER ID]');
It's important to note that this key should be kept secure as well.
Code: -1; Message: Failed to get a token for the API key xxxxxx: User does not exist
I have created the Team-APIKEY- and API-Secret which is used in credentials.
I have setup a relayer in Defender also, but both seems not to be related or at least I see nothing to add a User to one of both things.
What I wanted to do actually is:
const contract = new ethers.Contract(contractAddress, abi, signer);
tx = await contract.functions.safeTransferFrom(from, to, tokenId, amount, .... });