Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here.
If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.
(error)
Danger
This is reference documentation for the v1 REST API, which has been deprecated. You should use the current v2 REST API.
The User resource of Programmable Chat represents a particular user represented by an
Identity as provided by the developer. Users exist within a single Chat
Service instance. Users need to be unique (by Identity) within a Service instance.
User records are used to assign permissions via Roles within a Service instance
and determine what the user can and cannot do within the instance.
Users can be created within a Service instance via the client capability token
or via the User resource REST API methods.
The first time a new Identity is encountered by Chat within a Service
instance, a new User instance will be created using the Identity encountered.
If the Identity exists, the existing User record will be used for that
session/request. This is true for endpoints and Access Tokens, and for creating Members
in a POST to the Members resource.
Users can also be retrieved by either User Sid or Identity via a GET to the Users resource.
The JSON string that stores application-specific data. Note If this property has been assigned a value, it's only displayed in a FETCH action that returns a single resource; otherwise, it's null. If the attributes have not been set, {} is returned.
The application-defined string that uniquely identifies the resource's User within the Service. This value is often a username or an email address. See access tokens for more info.
Whether the User is actively connected to the Service instance and online. This value is only returned by Fetch actions that return a single resource and null is always returned by a Read action. This value is null if the Service's reachability_enabled is false, if the User has never been online for the Service instance, even if the Service's reachability_enabled is true.
Whether the User has a potentially valid Push Notification registration (APN or GCM) for the Service instance. If at least one registration exists, true; otherwise false. This value is only returned by Fetch actions that return a single resource and null is always returned by a Read action. This value is null if the Service's reachability_enabled is false, and if the User has never had a notification registration, even if the Service's reachability_enabled is true.
The identity value that uniquely identifies the new resource's User within the Service. This value is often a username or email address. See the Identity documentation for more details.