Each person staffing your chat service should be given a user account. User accounts are used to configure your chat service and to answer chats. The account created when you first signed up for our service is called your top-level account. All of your user accounts will be managed and owned by this top-level account.
LibraryH3lp supports cookie-based authentication. To learn more, you can read the details on authentication.
Requests are served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
An user instance resource represents a single user managed by the user account provided during authentication.
/2011-12-03/users/{UserId}
A User resource is represented by the following properties:
Property | Description |
---|---|
id | Unique integer identifier for a user. |
type | String that is always "user" |
name | String of up to 40 characters that uniquely identifies the user. Name is a person's username for the system. The name of a user forms the node identifier of a user's JID (Jabber ID) and thus must conform to the XMPP standard for node identifier and be lowercase. That is, user names cannot contain spaces or any of the characters "&'/:<>@\. Because both queues and users have JIDs, a queue cannot have the same name as a user and vice versa. |
String containing an e-mail address for the user. This e-mail address is used when forwarding chat transcripts or tagging a chat transcript for follow-up. The e-mail address is also used as a forwarding address if someone sends an e-mail to a user's JID. Forwarding functionality not yet implemented. | |
show | String reflecting the current availability of the user for chat. Possible values are "chat", "available", "dnd", "away", "xa", "unavailable". The Presence API also provides this information. |
status | String containing a natural-language description of a user's availability. |
Allows you to retrieve a user's information.
Returns a JSON response containing a representation of a user, including the properties above.
GET /2011-12-03/users/30826
{
"id": 30826,
"type": "user",
"name": "test-user",
"email": "test-user@somecompany.com",
"show": "unavailable",
"status": ""
}
Not supported.
Allows you to modify the properties of an existing user.
You may include, as JSON PUT data, any of the following properties.
Property | Description |
---|---|
name | String of up to 40 characters that uniquely identifies the user. Name is a person's username for the system. The name of a user forms the node identifier of a user's JID and thus must conform to the XMPP standard for node identifier and be lowercase. That is, user names cannot contain spaces or any of the characters "&'/:<>@\. Because both queues and users have JIDs, a queue cannot have the same name as a user and vice versa. |
password | String containing the password for the new user. |
String containing an e-mail address for the user. This e-mail address is used when forwarding chat transcripts or tagging a chat transcript for follow-up. The e-mail address is also used as a forwarding address if someone sends an e-mail to a user's JID. Forwarding functionality not yet implemented. |
Always returns a JSON response containing a representation of the user resource. If a parameter contains an illegal value, the illegal value is ignored and the original value retained and returned in the representation.
PUT /2011-12-03/users/35158
{
"name": "amy-renamed-user"
}
[
{
"id": 35158
"type": "user",
"name": "my-renamed-user",
"email": "",
"show": "unavailable",
"status": ""
}
]
Allows you to delete a user.
Returns a JSON response with the following properties:
Property | Description |
---|---|
success | Boolean indicating if the request was successful. |
message | Optional. If success is null, message is a string describing the reason for the failed request. |
DELETE /2011-12-03/users/35158
{
"success": true
}
The Users list resource represents the set of Users managed by the user whose credentials were used to make the API request.
/2011-12-03/users
Returns all the users managed or created by the user whose credentials were used to make the API request.
Returns a JSON response containing a list of User resources.
GET /2011-12-03/users
[
{
"id": 30826
"type": "user",
"name": "test-user",
"email": "test-user@somecompany.com",
"show": "unavailable",
"status": ""
}, {
"id": 35158
"type": "user",
"name": "my-user",
"email": "",
"show": "unavailable",
"status": ""
},
]
Allows you to create a new user.
Each post must include, as JSON POST data, all of the following properties.
Property | Description |
---|---|
name | String of up to 40 characters that uniquely identifies the user. Name is a person's username for the system. The name of a user forms the node identifier of a user's JID and thus must conform to the XMPP standard for node identifier and be lowercase. That is, user names cannot contain spaces or any of the characters "&'/:<>@\. Because both queues and users have JIDs, a queue cannot have the same name as a user and vice versa. |
password | String containing the password for the new user. |
type | Always "user". |
If successful, returns a JSON response containing the resource representation of the newly created user. If unsuccessful, returns a JSON response with the following properties:
Property | Description |
---|---|
success | Boolean indicating if the request was successful. |
message | Optional. If success is null, message is a string describing the reason for the failed request. |
POST /2011-12-03/users
{
"name": "my-new-user",
"password": "secret",
"type": "user",
}
[
{
"id": 35158,
"type": "user",
"name": "my-new-user",
"email": "",
"show": "unavailable",
"status": ""
}
]
POST /2011-12-03/users
name=my-new-user&password=secret&type=user
{
"success": null,
"message": "Sorry, a user with that name already
exists. Please choose another name."
}
Not supported.
Not supported.