-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
oauth.access.json
70 lines (70 loc) · 6.48 KB
/
oauth.access.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
"group": "oauth",
"name": "oauth.access",
"deprecated": false,
"desc": "Exchanges a temporary OAuth verifier code for an access token.",
"args": {
"client_id": {
"required": false,
"example": "2141029472.691202649728",
"desc": "Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.",
"type": "string"
},
"client_secret": {
"required": false,
"example": "e1b9e11dfcd19c1982d5de12921e17e8c",
"desc": "Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.",
"type": "string"
},
"code": {
"required": false,
"example": "4724469134.4644010092847.232b4e6d82c333b475fc30f5f5a341d294feb1a94392c2fd791f7ab7731a443d1a",
"desc": "The code param returned via the OAuth callback.",
"type": "string"
},
"redirect_uri": {
"required": false,
"example": "http://example.com",
"desc": "This must match the originally submitted URI (if one was sent).",
"type": "string"
},
"single_channel": {
"required": false,
"example": "false",
"desc": "Request the user to add your app only to a single channel. Only valid with a legacy workspace app.",
"type": "boolean"
}
},
"response": {
"examples": [
"{\n \"access_token\": \"xoxp-XXXXXXXX-XXXXXXXX-XXXXX\",\n \"scope\": \"groups:write\",\n \"team_name\": \"Wyld Stallyns LLC\",\n \"team_id\": \"TXXXXXXXXX\",\n \"enterprise_id\": null\n}",
"{\n \"access_token\": \"xoxp-XXXXXXXX-XXXXXXXX-XXXXX\",\n \"scope\": \"incoming-webhook,commands,bot\",\n \"team_name\": \"Team Installing Your Hook\",\n \"team_id\": \"TXXXXXXXXX\",\n \"enterprise_id\": null,\n \"incoming_webhook\": {\n \"url\": \"https://hooks.slack.com/TXXXXX/BXXXXX/XXXXXXXXXX\",\n \"channel\": \"#channel-it-will-post-to\",\n \"configuration_url\": \"https://teamname.slack.com/services/BXXXXX\"\n },\n \"bot\": {\n \"bot_user_id\": \"UTTTTTTTTTTR\",\n \"bot_access_token\": \"xoxb-XXXXXXXXXXXX-TTTTTTTTTTTTTT\"\n }\n}",
"{\n \"ok\": true,\n \"access_token\": \"xoxa-access-token-string\",\n \"token_type\": \"app\",\n \"app_id\": \"A012345678\",\n \"app_user_id\": \"U0NKHRW57\",\n \"team_name\": \"Subarachnoid Workspace\",\n \"team_id\": \"T061EG9R6\",\n \"enterprise_id\": null,\n \"authorizing_user\": {\n \"user_id\": \"U061F7AUR\",\n \"app_home\": \"D0PNCRP9N\"\n },\n \"installer_user\": {\n \"user_id\": \"U061F7AUR\",\n \"app_home\": \"D0PNCRP9N\"\n },\n \"scopes\": {\n \"app_home\": [\n \"chat:write\",\n \"im:history\",\n \"im:read\"\n ],\n \"team\": [],\n \"channel\": [\n \"channels:history\",\n \"channels:read\",\n \"chat:write\"\n ],\n \"group\": [\n \"chat:write\"\n ],\n \"mpim\": [\n \"chat:write\"\n ],\n \"im\": [\n \"chat:write\"\n ],\n \"user\": []\n }\n}",
"{\n \"ok\": false,\n \"error\": \"invalid_client_id\"\n}"
]
},
"errors": {
"bad_client_secret": "Value passed for client_secret was invalid.",
"bad_redirect_uri": "Value passed for redirect_uri did not match the redirect_uri in the original request.",
"code_already_used": "Value passed for code was already exchanged.",
"internal_error": "The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.",
"invalid_client_id": "Value passed for client_id was invalid.",
"invalid_code": "Value passed for code was invalid.",
"invalid_token": "Invalid refresh token.",
"missing_resource": "Missing permission resource.",
"ratelimited": "The request has been ratelimited. Refer to the Retry-After header for when to retry the request.",
"oauth_authorization_url_mismatch": "The OAuth flow was initiated on an incorrect version of the authorization url. The flow must be initiated via /oauth/authorize.",
"accesslimited": "Access to this method is limited on the current network.",
"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.",
"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.",
"invalid_arguments": "The method was either called with invalid arguments or some detail about the arguments passed is invalid, which is more likely when using complex arguments like blocks or attachments.",
"invalid_array_arg": "The method was passed an array as an argument. Please only input valid strings.",
"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.",
"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.",
"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.",
"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.",
"request_timeout": "The method was called via a POST request, but the POST data was either missing or truncated.",
"service_unavailable": "The service is temporarily unavailable.",
"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."
}
}