50006: Programmable Chat: Invalid Account SID
CHAT
ERROR
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.
- 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
SKprefix, while an Account SID uses theACprefix. - 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.
- Copy the Account SID directly from the Twilio Console and send that value in the request. (help.twilio.com)
- Verify that the Account SID starts with
ACand 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
SKprefix 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.