Search

Search Messages

GET
/search.messages

Searches for messages matching a query.

Authorization

slackAuth search:read
AuthorizationBearer <token>

In: header

Scope: search:read

Query Parameters

token*string

Authentication token. Requires scope: search:read

count?integer

Pass the number of results you want per "page". Maximum of 100.

Formatint32
highlight?boolean

Pass a value of true to enable query highlight markers (see below).

page?integer
Formatint32
query*string

Search query.

sort?string

Return matches sorted by either score or timestamp.

sort_dir?string

Change sort direction to ascending (asc) or descending (desc).

Header Parameters

Content-Type*"application/x-www-form-urlencoded"

Value in

  • "application/x-www-form-urlencoded"

Response Body

application/json

application/json

curl -X GET "https://example.com/search.messages?token=string&query=string" \  -H "Content-Type: application/x-www-form-urlencoded"
{  "ok": "True"}