---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/50006#article
headline: "50006: Programmable Chat: Invalid Account SID"
url: https://www.twilio.com/docs/api/errors/50006
inLanguage: en
dateModified: 2026-06-09T11:00:42.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 50006: Programmable Chat: Invalid Account SID

Log Type: APPLICATION

Log Level: ERROR

## Description

This error occurs when a Programmable Chat request includes an Account SID that does not match the required Account SID format. An Account SID is a 34-character SID that begins with `AC` and is followed by 32 hexadecimal characters.

### Possible causes

* The Account SID value in the request does not match the required pattern `AC[0-9a-f]{32}`.
* The request uses a different Twilio SID type instead of an Account SID. For example, an API Key SID uses the `SK` prefix, while an Account SID uses the `AC` prefix.
* The Account SID was copied incorrectly, truncated, or altered before the request was sent. This is the most likely outcome when the submitted value no longer matches the required Account SID format.

### Possible solutions

* Copy the Account SID directly from the Twilio Console and send that value in the request. ([help.twilio.com](https://help.twilio.com/articles/14726256820123-What-is-a-Twilio-Account-SID-and-where-can-I-find-it-))
* Verify that the Account SID starts with `AC` and contains 32 hexadecimal characters after the prefix.
* Make sure you are passing an Account SID, not another credential such as an API Key SID. API Key SIDs use the `SK` prefix and are not interchangeable with Account SIDs.
* If you build requests from environment variables or application configuration, confirm that the correct Account SID is loaded for the request. For production REST API authentication, use API keys as credentials and keep the Account SID value only where the API requires it.

#### Additional resources

* [What is a String Identifier (SID)?](/docs/glossary/what-is-a-sid)
* [What Is a Twilio Account SID and Where Can I Find It?](https://help.twilio.com/articles/14726256820123-What-is-a-Twilio-Account-SID-and-where-can-I-find-it-)
* [API keys overview](/docs/iam/api-keys)
