AWS CodeArtifact Credential Authentication Failure

Unity Version: 2020.3.16f1
I’m planning to host our UPM packages on AWS CodeArtifact. I followed the AWS Code Artificat npm login guidline to login into the NPM registry and [Unity’s manual ](http:// Unity - Manual: Scoped registry authentication)to copy the npm authentication token to .upmconfig.toml file.
Unity gives me the following error:
Request[Get https://…amazonaws.com:443/npm/…/…tgz] failed because it lacks valid authentication credentials.

I noticed that the npm authentication token has 1184 characters, although, I have no problem using npm CLI to publish the package.

Any suggestions if anything I did wrong, or it’s a Unity issue?

I don’t know if you have already solved your problem, but I’m gonna post here in case it could help someone in the future.

Maybe you are using the incorrect authentication key in your .upmconfig.toml file. Depending on the type of Authentication, you should use token or _auth as described below:

Token based authentication (Bearer)

token = "<AUTH TOKEN _authToken in .npmrc)>"
email = "<EMAIL>"
alwaysAuth = <BOOLEAN>```

**Base64 authentication (Basic)**
```[npmAuth."<REGISTRY URL>"]
_auth = "<BASE64 ENCODED TOKEN (_auth in .npmrc)>"
email = "<EMAIL>"
alwaysAuth = <BOOLEAN>```
1 Like