Get
/api/v1/push.get
Get push notification for a message.
Changelog
Version | Description |
---|---|
3.5.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authorization token of the user.
Example9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq
X-User-Id
stringRequired
The user ID of the user.
ExampleaobEdbYhXfu5hkeqG
Query parameters
id
stringRequired
The message ID.
ExampleWkbwSntxt8D3jLp8G
Responses
200
Success Example
{
"data": {
"message": {
"_id": "WkbwSntxt8D3jLp8G",
"rid": "iu7jtPAhvEeAS5tNq",
"msg": "fsfs",
"ts": "2021-10-22T14:29:23.581Z",
"u": {
"_id": "d26x6zSkaPSe5gCyy",
"username": "rodriq",
"name": "Rodriq"
},
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "fsfs"
}
]
}
],
"_updatedAt": "2021-10-22T14:29:23.603Z"
},
"notification": {
"from": "push",
"badge": 2,
"sound": "default",
"priority": 10,
"title": "#vb",
"text": "rodriq: fsfs",
"payload": {
"host": "http://localhost:3000/",
"messageId": "WkbwSntxt8D3jLp8G",
"notificationType": "message",
"rid": "iu7jtPAhvEeAS5tNq",
"sender": {
"_id": "d26x6zSkaPSe5gCyy",
"username": "rodriq",
"name": "Rodriq"
},
"senderName": "rodriq",
"type": "c",
"name": "vb"
},
"userId": "d26x6zSkaPSe5gCyy",
"notId": 654494840,
"gcm": {
"style": "inbox",
"image": "http://localhost:3000/images/logo/android-chrome-192x192.png"
},
"apn": {
"category": "MESSAGE"
}
}
},
"success": true
}
object
data
object
message
object
_id
string
rid
string
msg
string
ts
string
u
object
_id
string
username
string
name
string
urls
Array of object
object
mentions
Array of object
object
channels
Array of object
object
md
Array of object
object
type
string
value
Array of object
object
type
string
value
string
_updatedAt
string
notification
object
from
string
badge
integer
sound
string
priority
integer
title
string
text
string
payload
object
host
string
messageId
string
notificationType
string
rid
string
sender
object
_id
string
username
string
name
string
senderName
string
type
string
name
string
userId
string
notId
integer
gcm
object
style
string
image
string
apn
object
category
string
success
boolean
400
Bad Request
Example
{
"success": false,
"error": "Match error: Missing key 'id'"
}
object
success
boolean
error
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string