List users
curl --request GET \
--url https://public-api.dev.workchats.com/v1/users \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.dev.workchats.com/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.dev.workchats.com/v1/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"next_cursor": "<string>",
"ok": true,
"users": [
{
"avatar_url": "https://cdn.workchats.com/a/9a1d2c3e.png",
"display_name": "Connor",
"email": "[email protected]",
"id": "usr_9a1d2c3e-4b5f-4a6b-8c7d-9e0f1a2b3c4d",
"is_active": true,
"is_admin": false,
"is_bot": false,
"is_external": false,
"name": "Connor Berwick",
"timezone": "Asia/Dubai",
"title": "Sales"
}
]
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}Reference
List users
Lists the workspace’s people: its members, and guests who are visible to them. Deactivated and removed people stay listed with is_active: false. Bots are never listed. email is present only with the users:read.email scope, and only when the person lets colleagues see it. Needs users:read. Limited to 20 requests a minute per installation.
GET
/
v1
/
users
List users
curl --request GET \
--url https://public-api.dev.workchats.com/v1/users \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.dev.workchats.com/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.dev.workchats.com/v1/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"next_cursor": "<string>",
"ok": true,
"users": [
{
"avatar_url": "https://cdn.workchats.com/a/9a1d2c3e.png",
"display_name": "Connor",
"email": "[email protected]",
"id": "usr_9a1d2c3e-4b5f-4a6b-8c7d-9e0f1a2b3c4d",
"is_active": true,
"is_admin": false,
"is_bot": false,
"is_external": false,
"name": "Connor Berwick",
"timezone": "Asia/Dubai",
"title": "Sales"
}
]
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}{
"error": {
"code": "token_revoked",
"message": "The token has been revoked."
},
"ok": false,
"request_id": "F7p0mJcXk3tq2x0AAAAB"
}Authorizations
Bot token (wc_bot_live_… or wc_bot_test_…) from the OAuth install
Query Parameters
Page size, 200 by default. Values above 1000 are clamped.
Required range:
x >= 1The previous page's next_cursor. Omit it for the first page.