# Publishing API returns 401 ‘Authentication Failed’ with valid user token

## post by eriksencosta on Mar 27, 2024

Eriksen Costa

Yesterday, I started getting 401 ‘Authentication Failed’. However, I didn’t change anything on my build script, and I’ve been able to publish to Central Repository for 20+ days straight.

I even generated a new user token and tested it by calling the status API, and the result was the same:

```rust
curl --request POST --verbose --header 'Authorization: UserToken {UserTokenValue}' 'https://central.sonatype.com/api/v1/publisher/status?id={deploymentId}'

// Response: 401
{
  "error": {
    "message": "Authentication Failed"
  }
}
```

Has anybody experienced the same issue? I also tested using `Bearer` instead of `UserToken` on the `Authorization` header.

## post by eriksencosta on Mar 28, 2024

Eriksen Costa

It’s working again. It was probably a service disruption.

## post by evil.com on Mar 29, 2024

Set.constructor`alert\x28document.domain\x29

### New & Unread Topics

| Topic | Replies | Views | Activity |
| --- | --- | --- | --- |
| [Maven Central publishing limits: what high-volume publishers need to know](https://community.sonatype.com/t/maven-central-publishing-limits-what-high-volume-publishers-need-to-know/16420) | [0](https://community.sonatype.com/t/maven-central-publishing-limits-what-high-volume-publishers-need-to-know/16420/1) | 133 | [Jun 16](https://community.sonatype.com/t/maven-central-publishing-limits-what-high-volume-publishers-need-to-know/16420/1) |
| [Deployment error: Dependencies to SNAPSHOT versions not allowed](https://community.sonatype.com/t/deployment-error-dependencies-to-snapshot-versions-not-allowed/15647) | [4](https://community.sonatype.com/t/deployment-error-dependencies-to-snapshot-versions-not-allowed/15647/1) | 184 | [Oct 2025](https://community.sonatype.com/t/deployment-error-dependencies-to-snapshot-versions-not-allowed/15647/5) |
| [Feature request: Different levels for Maven Central tokens (deploy and publish)](https://community.sonatype.com/t/feature-request-different-levels-for-maven-central-tokens-deploy-and-publish/16472) | [0](https://community.sonatype.com/t/feature-request-different-levels-for-maven-central-tokens-deploy-and-publish/16472/1) | 22 | [8d](https://community.sonatype.com/t/feature-request-different-levels-for-maven-central-tokens-deploy-and-publish/16472/1) |
| [Update: Maven Central Publishing Limits Enforcement Moved to October 1](https://community.sonatype.com/t/update-maven-central-publishing-limits-enforcement-moved-to-october-1/16475) | [0](https://community.sonatype.com/t/update-maven-central-publishing-limits-enforcement-moved-to-october-1/16475/1) | 31 | [5d](https://community.sonatype.com/t/update-maven-central-publishing-limits-enforcement-moved-to-october-1/16475/1) |
| [I have updated the Nexus from 3.71.0 to 3.77.2 using AWS ECS Setup but getting an error.](https://community.sonatype.com/t/i-have-updated-the-nexus-from-3-71-0-to-3-77-2-using-aws-ecs-setup-but-getting-an-error/15431) | [1](https://community.sonatype.com/t/i-have-updated-the-nexus-from-3-71-0-to-3-77-2-using-aws-ecs-setup-but-getting-an-error/15431/1) | 94 | [Aug 2025](https://community.sonatype.com/t/i-have-updated-the-nexus-from-3-71-0-to-3-77-2-using-aws-ecs-setup-but-getting-an-error/15431/2) |
