Join a public channel
POST
Terminal window
/api/public/apps/v1/channels/{channelId}/join
Needs the channels:join permission.
The app adds itself to a public channel. Joining twice changes nothing. A private channel can only be joined when a person adds the app to it.
Parameters
Section titled “Parameters”| Name | In | Required | Meaning |
|---|---|---|---|
channelId |
path | yes | A public channel of the workspace. |
Example
Section titled “Example”curl -X POST "https://amedeus.app/api/public/apps/v1/channels/<channel id>/join" \ -H "Authorization: Bearer $TOKEN"const response = await fetch("https://amedeus.app/api/public/apps/v1/channels/<channel id>/join", { method: "POST", headers: { Authorization: `Bearer ${process.env.TOKEN}` },});const result = await response.json(); // { ok: true, … } or { ok: false, error, message }import jsonimport osimport urllib.request
request = urllib.request.Request( "https://amedeus.app/api/public/apps/v1/channels/<channel id>/join", headers={ "Authorization": f"Bearer {os.environ['TOKEN']}", "User-Agent": "my-app/1.0", }, method="POST",)with urllib.request.urlopen(request) as response: result = json.load(response) # a 4xx or 5xx raises urllib.error.HTTPErrorResponse
Section titled “Response”| Field | Type | Required | Meaning |
|---|---|---|---|
ok |
true |
yes |
{ "ok": true}Errors
Section titled “Errors”Failures answer { "ok": false, "error": "<code>", "message": "…" }; see Errors.
401: The token is missing, wrong or revoked.403: A missing scope (the message names it), or a channel the app isn’t in.404: The message or channel doesn’t exist.429: Slow down;Retry-Aftersays for how many seconds.