If I understand what you’re doing, sending an API call into Apigee PaaS, with a specific API key, it works.
Sending the same API call into Apigee emulator, with the same API key, it is rejected.
The runtime in the emulator is a real runtime, distinct from Apigee PaaS, and it has its own set of known API keys. You cannot assume that the API Keys known to Apigee in the cloud are also known to the APigee runtime in the emulator. You need to ensure the API keys you use with the emulator are available and valid in the emulator. Have you done that?