Reply from a notification
Sends a chat message that the student typed into a push notification, from the
Android inline reply or the iOS reply action. The native handler has no session, so
this route takes no Authorization header. The replyToken from the notification
data authenticates it. A reply token is valid for 14 days and only for this route.
The server answers 202 at once, then runs the normal chat turn. Lala’s answer
arrives as a new reply push, and both messages are in the history.
Send a clientId and repeat it on a retry. A repeated clientId gets 202 again
and does not send the message a second time.
curl --request POST \
--url https://client-api.lala.ist/api/notifications/reply \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"text": "<string>",
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
text: '<string>',
clientId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://client-api.lala.ist/api/notifications/reply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://client-api.lala.ist/api/notifications/reply"
payload = {
"token": "<string>",
"text": "<string>",
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accepted": true
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}Body
The replyToken from the data of the notification the student replied to.
1 - 4096What the student typed into the notification.
1 - 4000A UUID the device makes once per reply and repeats on a retry. A repeat inside 10 minutes is accepted again and does not send a second message.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Response
The message is accepted and the turn has started
curl --request POST \
--url https://client-api.lala.ist/api/notifications/reply \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"text": "<string>",
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
text: '<string>',
clientId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://client-api.lala.ist/api/notifications/reply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://client-api.lala.ist/api/notifications/reply"
payload = {
"token": "<string>",
"text": "<string>",
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accepted": true
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}