-
Notifications
You must be signed in to change notification settings - Fork 1
Push Notification "devices" (aka. Push Keys) and adding own
Developer From Jokela edited this page Aug 14, 2020
·
1 revision
Wilma can send Push messages over GCM (and via Apple's own push system. I've only tested GCM or as nowadays called FCM.)
Wilma Push notification devices can be fetched from (role slug is not required, and recommended to leave out): https://<your_wilma_server/notifyuri/
Response:
{
"LoginResult":"Ok",
"Channels":[
{
"PrimaryChannel":"<PUSH_KEY>",
"PrimaryChannelId":""
},
{
"PrimaryChannel":"<PUSH_KEY>",
"PrimaryChannelId":""
}
]
}
POST Request to https://<your_wilma_server/notifyuri/
Data:
-
PrimaryChannel
: GCM/FCM ID -
PrimaryChannelId
: I don't know what it is used for. Wilma app leaves this blank, so we shall follow them 😉 -
DeviceType
: Number describing device type. Device types can be found here: Enums -
formkey
: User's formkey from/index_json
Response:
302 Redirect to https://<your_wilma_server/notifyuri/
:
{
"LoginResult":"Ok",
"Channels":[
{
"PrimaryChannel":"<YOUR_PUSH_KEY>",
"PrimaryChannelId":""
},
{
"PrimaryChannel":"<PUSH_KEY>",
"PrimaryChannelId":""
},
{
"PrimaryChannel":"<PUSH_KEY>",
"PrimaryChannelId":""
}
]
}
or typical Wilma error
POST Request to https://<your_wilma_server/notifyuri/
Data:
-
remove_live_id
: Empty parameter -
PrimaryChannel
: GCM/FCM ID -
formkey
: User's formkey from/index_json
Response:
302 Redirect to https://<your_wilma_server/notifyuri/
:
{
"LoginResult":"Ok",
"Channels":[
{
"PrimaryChannel":"<PUSH_KEY>",
"PrimaryChannelId":""
},
{
"PrimaryChannel":"<PUSH_KEY>",
"PrimaryChannelId":""
}
]
}
or typical Wilma error