UserNotFoundException thrown for an existing Relay API Key

When using defender-autotask-client to update an Autotask linked to a Relay from my terminal, I received the below error:

Failed to get a token for the API key redacted {
code: 'UserNotFoundException',
name: 'UserNotFoundException',
message: 'User does not exist.'

Upon going to the Relay terminal, I've confirmed several times that the API key and API secret do indeed match and it is active.

Thanks for any help! Love the product

:computer: Environment
Relay on Kovan
Autotask (fails to update code from defender-autotask-client)
MacOS 12.1

:1234: Code to reproduce

I answered my own question.

Defender API Key + Secret is used for remote usage

Team API Key is what is used for programmatically accessing various Defender admin capabilities, including Autotask code update.

Now I could delete this question to save face, but I'll leave it here in case someone else treads the same wrong path :wink:


Thanks @flaco_jones for leaving the Q&A here! I can tell you that you're not the first to run into this confusion. We'll make a note to make this difference clearer in Defender.