Fix typo in RegisterAgent api_key attribute setting

Registering agents is broken since the incorrect resource attribute is
being set.