curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 1319b4991186601ccf4df2d0fa89565f68012bba" \
https://api.quickblox.com/chat/Message/66f2a030bba14b4c2e000000
{
"message": "hello",
"attachments": [],
"_id": "66f2a030bba14b4c2e000000",
"created_at": "2024-09-24T11:19:12Z",
"updated_at": "2024-09-24T11:19:12Z",
"chat_dialog_id": "66ed332108a4fb0d2dc2d147",
"date_sent": 1727176752,
"sender_id": 20618,
"recipient_id": 0,
"read_ids": [
20618
],
"delivered_ids": [
20618
],
"read": 0
}
{
"errors": [
"You don't have appropriate permissions to perform this operation"
]
}
{
"errors": [
"The resource wasn't found"
]
}
Get Message by ID
Retrieve a message by ID.
Added in v2.39.0
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 1319b4991186601ccf4df2d0fa89565f68012bba" \
https://api.quickblox.com/chat/Message/66f2a030bba14b4c2e000000
{
"message": "hello",
"attachments": [],
"_id": "66f2a030bba14b4c2e000000",
"created_at": "2024-09-24T11:19:12Z",
"updated_at": "2024-09-24T11:19:12Z",
"chat_dialog_id": "66ed332108a4fb0d2dc2d147",
"date_sent": 1727176752,
"sender_id": 20618,
"recipient_id": 0,
"read_ids": [
20618
],
"delivered_ids": [
20618
],
"read": 0
}
{
"errors": [
"You don't have appropriate permissions to perform this operation"
]
}
{
"errors": [
"The resource wasn't found"
]
}
Recipes
Get message by ID
Get message by ID
1. Specify the message ID
message_id of the message whose reactions you want to retrieve.curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98
2. As a result, the API returns a specified message.
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98
Get message with reactions (added in v2.58.0)
Get message with reactions (added in v2.58.0)
1. Specify the message ID
message_id of the message whose reactions you want to retrieve.curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
2. Set the `include_reactions` query parameter
include_reactions=1 query parameter.curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
3. As a result, the API returns a specified message with reactions.
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
Get message by ID with API key
Get message by ID with API key
1. Use 'Authorization' header to pass API key
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98
2. Use 'On-Behalf-Of' header to pass user id
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98
3. Specify the message ID
message_id of the message whose reactions you want to retrieve.curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98
4. As a result, the API returns a specified message.
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98
Get message with reactions using API key (added in v2.58.0)
Get message with reactions using API key (added in v2.58.0)
1. Use 'Authorization' header to pass API key
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
2. Use 'On-Behalf-Of' header to pass user id
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
3. Specify the message ID
message_id of the message whose reactions you want to retrieve.curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
4. Set the `include_reactions` query parameter
include_reactions=1 query parameter.curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
3. As a result, the API returns a specified message with reactions.
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
https://api.quickblox.com/chat/Message/5d75626ea28f9a1490cb0f98?include_reactions=1
Path Parameters
Query Parameters
1 to include reactions data in the message response. Default is 0. Headers
ApiKey {your_api_key}. Must be used either QB-Token or Authorization.Responses
200
200
?include_reactions=1.403
403
404
404
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 1319b4991186601ccf4df2d0fa89565f68012bba" \
https://api.quickblox.com/chat/Message/66f2a030bba14b4c2e000000
{
"message": "hello",
"attachments": [],
"_id": "66f2a030bba14b4c2e000000",
"created_at": "2024-09-24T11:19:12Z",
"updated_at": "2024-09-24T11:19:12Z",
"chat_dialog_id": "66ed332108a4fb0d2dc2d147",
"date_sent": 1727176752,
"sender_id": 20618,
"recipient_id": 0,
"read_ids": [
20618
],
"delivered_ids": [
20618
],
"read": 0
}
{
"errors": [
"You don't have appropriate permissions to perform this operation"
]
}
{
"errors": [
"The resource wasn't found"
]
}
Was this page helpful?