---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/25022#article
headline: "25022: Duplicate username or externalId"
url: https://www.twilio.com/docs/api/errors/25022
inLanguage: en
dateModified: 2026-06-09T11:00:42.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 25022: Duplicate username or externalId

Log Type: APPLICATION

Log Level: ERROR

## Description

Twilio returned this error because the `username` or `externalId` you provided already belongs to an existing user. Each user must have a unique `username` and, when provided, a unique `externalId`.

### Possible causes

* You attempted to create a new user with a `username` that is already assigned to another user.
* You attempted to create a new user with an `externalId` that is already assigned to another user.
* Your application retried a user creation request and sent the same identity values more than once.
* Your integration does not check for existing users before creating a new one.

### Possible solutions

* Update the request so the `username` is unique for the user you want to create.
* Update the request so the `externalId` is unique if your integration uses that field.
* Check whether the user already exists before sending a create request.
* If you intended to modify an existing user, update that user instead of creating a new one.
* Review your application's retry and provisioning logic to prevent duplicate user creation requests.

#### Additional resources

* [Identity and Access Management docs](/docs/iam)
* [Manage users with Twilio Identity and Access Management](/docs/iam)
