Poll new messages
curl --request GET \
--url https://api.notifique.dev/public/ai-widget/{publicKey}/messagesconst options = {method: 'GET'};
fetch('https://api.notifique.dev/public/ai-widget/{publicKey}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/public/ai-widget/{publicKey}/messages"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/public/ai-widget/{publicKey}/messages"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"messages": [
{
"id": "<string>",
"role": "<string>",
"body": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
}Widget público
Poll new messages
Fetch new messages since the last poll.
GET
/
public
/
ai-widget
/
{publicKey}
/
messages
Poll new messages
curl --request GET \
--url https://api.notifique.dev/public/ai-widget/{publicKey}/messagesconst options = {method: 'GET'};
fetch('https://api.notifique.dev/public/ai-widget/{publicKey}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/public/ai-widget/{publicKey}/messages"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/public/ai-widget/{publicKey}/messages"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"messages": [
{
"id": "<string>",
"role": "<string>",
"body": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
}Was this page helpful?
⌘I

