Skip to content

Commit af12c63

Browse files
author
Slack API Ref Buildbot
committed
Updated from Slack docs, 2025/11/03
1 parent c7d7813 commit af12c63

File tree

3 files changed

+183
-0
lines changed

3 files changed

+183
-0
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"desc": "Fetches the expiration timestamp for a guest",
3+
"http_method": "GET",
4+
"scope": {},
5+
"rate_limits": "t4",
6+
"args": {
7+
"type": "object",
8+
"required": [
9+
"token",
10+
"user"
11+
],
12+
"properties": {
13+
"token": {
14+
"type": "string",
15+
"subtype": "auth",
16+
"example": "xxxx-xxxxxxxxx-xxxx"
17+
},
18+
"user": {
19+
"schema": "user_id",
20+
"desc": "The ID of the guest user to get the expiration for.",
21+
"example": "U123ABC456"
22+
},
23+
"target_team": {
24+
"desc": "If an org token is passed in and this team is on the org, it will operate on the workspace level on the specified team. Otherwise it will operate on the org or team in context.",
25+
"example": "T123ABC456",
26+
"schema": "workspace_id"
27+
}
28+
}
29+
},
30+
"output": {
31+
"type": "object",
32+
"user": {
33+
"required": [
34+
"id",
35+
"email",
36+
"is_restricted",
37+
"is_ultra_restricted"
38+
],
39+
"properties": {
40+
"id": {
41+
"type": "string",
42+
"desc": "Encoded user ID"
43+
},
44+
"username": {
45+
"type": "string",
46+
"desc": "Username of user"
47+
},
48+
"email": {
49+
"type": "string",
50+
"desc": "Email address of user"
51+
},
52+
"is_restricted": {
53+
"type": "boolean",
54+
"desc": "Whether the user is a multi-channel guest."
55+
},
56+
"is_ultra_restricted": {
57+
"type": "boolean",
58+
"desc": "Whether the user is a single-channel guest."
59+
},
60+
"expiration_ts": {
61+
"type": "number",
62+
"desc": "Expiration timestamp for the guest user."
63+
}
64+
}
65+
}
66+
},
67+
"errors": {
68+
"paid_teams_only": {
69+
"desc": "This feature is only accessible to paid teams"
70+
},
71+
"no_perms": {
72+
"desc": "User does not have appropriate permissions."
73+
},
74+
"team_not_found": {
75+
"desc": "Team not found"
76+
},
77+
"user_not_found": {
78+
"desc": "User not found"
79+
},
80+
"not_permitted": {
81+
"desc": "This action is not permitted"
82+
},
83+
"target_team_not_on_org": {
84+
"desc": "Target team specified is not on the org in context"
85+
},
86+
"user_is_not_guest": {
87+
"desc": "The user is not a guest"
88+
}
89+
},
90+
"examples": {
91+
"success": {
92+
"url": "/api/admin.users.getExpiration?token=YOUR_TOKEN&user=U123ABC456",
93+
"description": "Typical success response",
94+
"example": {
95+
"ok": true,
96+
"user": {
97+
"id": "U123ABC456",
98+
"email": "[email protected]",
99+
"is_restricted": false,
100+
"is_ultra_restricted": true,
101+
"expiration_ts": 0
102+
}
103+
}
104+
},
105+
"error": {
106+
"url": "/api/admin.users.getExpiration?token=YOUR_TOKEN&user=INCORRECT_ID",
107+
"description": "Typical error response",
108+
"example": {
109+
"ok": false,
110+
"error": "user_not_found"
111+
}
112+
}
113+
}
114+
}

docs.slack.dev/methods/methods.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,13 @@
559559
"admin"
560560
]
561561
},
562+
{
563+
"name": "admin.users.getExpiration",
564+
"description": "Fetches the expiration timestamp for a guest",
565+
"family": [
566+
"admin"
567+
]
568+
},
562569
{
563570
"name": "admin.users.invite",
564571
"description": "Invite a user to a workspace.",
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"group": "admin",
3+
"name": "admin.users.getExpiration",
4+
"deprecated": false,
5+
"desc": "Fetches the expiration timestamp for a guest",
6+
"args": {
7+
"user": {
8+
"required": true,
9+
"example": "U123ABC456",
10+
"desc": "The ID of the guest user to get the expiration for.",
11+
"type": "user"
12+
},
13+
"target_team": {
14+
"required": false,
15+
"example": "T123ABC456",
16+
"desc": "If an org token is passed in and this team is on the org, it will operate on the workspace level on the specified team. Otherwise it will operate on the org or team in context."
17+
}
18+
},
19+
"response": {
20+
"examples": [
21+
"{\n \"ok\": true,\n \"user\": {\n \"id\": \"U123ABC456\",\n \"email\": \"[email protected]\",\n \"is_restricted\": false,\n \"is_ultra_restricted\": true,\n \"expiration_ts\": 0\n }\n}",
22+
"{\n \"ok\": false,\n \"error\": \"user_not_found\"\n}"
23+
]
24+
},
25+
"errors": {
26+
"access_denied": "Access to a resource specified in the request is denied.",
27+
"accesslimited": "Access to this method is limited on the current network.",
28+
"account_inactive": "Authentication token is for a deleted user or workspace when using a bot token.",
29+
"deprecated_endpoint": "The endpoint has been deprecated.",
30+
"ekm_access_denied": "Administrators have suspended the ability to post a message.",
31+
"enterprise_is_restricted": "The method cannot be called from an Enterprise.",
32+
"fatal_error": "The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.",
33+
"invalid_arg_name": "The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than _. If you get this error, it is typically an indication that you have made a very malformed API call.",
34+
"invalid_array_arg": "The method was passed an array as an argument. Please only input valid strings.",
35+
"invalid_charset": "The method was called via a POST request, but the charset specified in the Content-Type header was invalid. Valid charset names are: utf-8 iso-8859-1.",
36+
"invalid_form_data": "The method was called via a POST request with Content-Type application/x-www-form-urlencoded or multipart/form-data, but the form data was either missing or syntactically invalid.",
37+
"invalid_post_type": "The method was called via a POST request, but the specified Content-Type was invalid. Valid types are: application/json application/x-www-form-urlencoded multipart/form-data text/plain.",
38+
"is_bot": "This method cannot be called by a legacy bot.",
39+
"method_deprecated": "The method has been deprecated.",
40+
"missing_post_type": "The method was called via a POST request and included a data payload, but the request did not include a Content-Type header.",
41+
"missing_scope": "The token used is not granted the specific scope permissions required to complete this request.",
42+
"no_permission": "The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.",
43+
"no_perms": "User does not have appropriate permissions.",
44+
"not_allowed_token_type": "The token type used in this request is not allowed.",
45+
"not_authed": "No authentication token provided.",
46+
"not_permitted": "This action is not permitted",
47+
"org_login_required": "The workspace is undergoing an enterprise migration and will not be available until migration is complete.",
48+
"paid_teams_only": "This feature is only accessible to paid teams",
49+
"ratelimited": "The request has been ratelimited. Refer to the Retry-After header for when to retry the request.",
50+
"request_timeout": "The method was called via a POST request, but the POST data was either missing or truncated.",
51+
"service_unavailable": "The service is temporarily unavailable.",
52+
"target_team_not_on_org": "Target team specified is not on the org in context",
53+
"team_added_to_org": "The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.",
54+
"team_not_found": "Team not found",
55+
"token_expired": "Authentication token has expired.",
56+
"token_revoked": "Authentication token is for a deleted user or workspace or the app has been removed when using a user token.",
57+
"two_factor_setup_required": "Two factor setup is required.",
58+
"unknown_method": "This method is currently not available.",
59+
"user_is_not_guest": "The user is not a guest",
60+
"user_not_found": "User not found"
61+
}
62+
}

0 commit comments

Comments
 (0)