The api username will tell Discourse which capabilities are enabled. An admin or a regular user don’t have the same capabilities, and using one or another will restrict what you can achieve using the api.
the api key is the password to be used with the api username.