New Relic/publish-sourcemap returns 401 after update

Hi, I upgrade the npm package to version 5.0.1. Unfortunetly after the upgrade it returns a 401.
The error is the following:

Getting source maps from https://sourcemaps.service.newrelic.com/v2/applications/myappid/sourcemaps
Fatal error: Invalid value "undefined" for header "Api-Key"

When checking the url I get “A valid API key is required”. So my guess is that either the config requirements have changed or I need to somehow hand over an api key when going to that url?
When downgrading to v4.4.2 all works as expected.

Any pointers to a doc or to what to update etc? Thanks!

@slaharnar Thanks for the post here! One somewhat recent change is the introduction of the New Relic personal user API key (NR_API_KEY). Previously I believe this used the Admin API key, though it should be backward compatible with both. I would review and check the account keys.

Though another thing you can check, how are you instrumenting this browser application (via APM agent auto-inject or copy/paste)?

What value are you using for “myappid”? Is it the –applicationId Browser application id (APPLICATION_ID) or the APM app Id?

Thank you again!