401 UNAUTHENTICATED, and the answer does not say which. So does a key used from a network it is not allowed on.
Getting a key
A tenant admin creates keys in the console. The secret is shown once and only a hash is stored. A key looks likepk_<live|test>_<id>_<secret>.
A live key with any write scope needs approval before it works, and whoever asked for it collects the secret afterwards. Managing keys is console work: it needs the manage scope, which no key can hold.
Scopes
Each page in the API reference names the scopes it accepts. Calling without one gets
403 MISSING_SCOPE, and error.details.scope names what is needed.
payments:write can be set on a key, but nothing uses it yet.