Endpoints
Call these through the okoro proxy at https://okoro.ai/p/slack
| Action | Method | Path | Min scope |
|---|---|---|---|
| Post message | POST | write | |
| Post ephemeral message | POST | write | |
| Update message | POST | write | |
| Delete message | POST | write | |
| Read channel history | GET | read | |
| List channels | GET | read | |
| Read channel info | GET | read | |
| List channel members | GET | read | |
| Join channel | POST | write | |
| Read user info | GET | read | |
| List users | GET | read | |
| List files | GET | read | |
| Get file upload URL | POST | write | |
| Complete file upload | POST | write | |
| Read reactions | GET | read | |
| Add reaction | POST | write |
Examples
Every request requires a short-lived operation token scoped to a single action.
1. Get an operation token
Exchange your service token for a short-lived operation token scoped to a single action.
TOKEN=$(curl -sX POST "https://okoro.ai/t/tokens" \
-H "Authorization: Bearer $OKORO_SERVICE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"provider": "slack", "scope": "read", "intent": "describe what you are doing"}' \
| jq -r '.token')2. Call the API
Use the operation token as a Bearer token. The proxy forwards the request to Slack and logs the action.
Post message
curl -X POST "https://okoro.ai/p/slack/chat.postMessage" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Post ephemeral message
curl -X POST "https://okoro.ai/p/slack/chat.postEphemeral" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Update message
curl -X POST "https://okoro.ai/p/slack/chat.update" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Delete message
curl -X POST "https://okoro.ai/p/slack/chat.delete" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Read channel history
curl -X GET "https://okoro.ai/p/slack/conversations.history" \
-H "Authorization: Bearer $TOKEN"List channels
curl -X GET "https://okoro.ai/p/slack/conversations.list" \
-H "Authorization: Bearer $TOKEN"Read channel info
curl -X GET "https://okoro.ai/p/slack/conversations.info" \
-H "Authorization: Bearer $TOKEN"List channel members
curl -X GET "https://okoro.ai/p/slack/conversations.members" \
-H "Authorization: Bearer $TOKEN"Join channel
curl -X POST "https://okoro.ai/p/slack/conversations.join" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Read user info
curl -X GET "https://okoro.ai/p/slack/users.info" \
-H "Authorization: Bearer $TOKEN"List users
curl -X GET "https://okoro.ai/p/slack/users.list" \
-H "Authorization: Bearer $TOKEN"List files
curl -X GET "https://okoro.ai/p/slack/files.list" \
-H "Authorization: Bearer $TOKEN"Get file upload URL
curl -X POST "https://okoro.ai/p/slack/files.getUploadURLExternal" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Complete file upload
curl -X POST "https://okoro.ai/p/slack/files.completeUploadExternal" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Read reactions
curl -X GET "https://okoro.ai/p/slack/reactions.get" \
-H "Authorization: Bearer $TOKEN"Add reaction
curl -X POST "https://okoro.ai/p/slack/reactions.add" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Scopes
Your service token must be configured with at least the required scope level.
readGET/api/conversations.list
/api/conversations.history
/api/conversations.info
/api/conversations.members
/api/users.list
/api/users.info
/api/files.list
/api/files.info
/api/reactions.getwriteGET
POST/api/chat.postMessage
/api/files.getUploadURLExternal
/api/files.completeUploadExternal
/api/reactions.add
/api/conversations.joinupdateGET
POST/api/chat.update
/api/chat.postEphemeraldeleteGET
POST/api/chat.delete
/api/files.deleteallGET
POST/api/**