Indicar que está digitando
curl --request POST \
--url https://api.olie.ai/api/management/channels/{channel}/typing \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olie.ai/api/management/channels/{channel}/typing"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olie.ai/api/management/channels/{channel}/typing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/channels/{channel}/typing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/channels/{channel}/typing"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.olie.ai/api/management/channels/{channel}/typing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/channels/{channel}/typing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response": true
}{
"response": false,
"message": "channel_model_not_found",
"error": "No query results for model [App\\Models\\Channel] 9b2a1c3e-4d5f-6789-abcd-ef0123456789"
}{
"response": false,
"message": "channel_capability_not_supported",
"error": "This channel does not support typing.",
"capability": "typing"
}{
"response": false,
"message": "too_many_requests",
"wait_seconds": 42
}channels
Indicar que está digitando
Mostra ao cliente que alguém está digitando na conversa; o canal informa se tem o recurso em capabilities.typing. O aviso vai ao provedor em segundo plano, e uma falha dele nunca volta na resposta. No WhatsApp Cloud (Meta), o aviso também marca como lida a última mensagem do cliente. O limite é de 30 chamadas por minuto por pessoa e canal.
POST
/
api
/
management
/
channels
/
{channel}
/
typing
Indicar que está digitando
curl --request POST \
--url https://api.olie.ai/api/management/channels/{channel}/typing \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.olie.ai/api/management/channels/{channel}/typing"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.olie.ai/api/management/channels/{channel}/typing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/channels/{channel}/typing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/channels/{channel}/typing"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.olie.ai/api/management/channels/{channel}/typing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/channels/{channel}/typing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"response": true
}{
"response": false,
"message": "channel_model_not_found",
"error": "No query results for model [App\\Models\\Channel] 9b2a1c3e-4d5f-6789-abcd-ef0123456789"
}{
"response": false,
"message": "channel_capability_not_supported",
"error": "This channel does not support typing.",
"capability": "typing"
}{
"response": false,
"message": "too_many_requests",
"wait_seconds": 42
}Was this page helpful?