Olá bom dia, Estou tentando fazer meu primeiro envio de notificação ativa pelo whatsapp utilizando php. Achei um código aqui no fórum e estou tentando adaptarmeu envio com base nele e no descrito aqui https://help.blip.ai/hc/pt-br/articles/360057514334 - Requisição 2: Envio da notificação com texto somente
Segue meu código abaixo
<?
$accesstoken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$str_data = '
{
"id":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"to":"[email protected]",
"type":"application/json",
"content":{
"type":"template",
"template":{
"namespace":"xxxxxxxxxxxxxxxxxxxxxxxx",
"name":"separacao_mercadoria",
"language":{
"code":"pt_BR",
"policy":"deterministic"
},
"components":[
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "www.cimcal.com"
}
]
}
]
}
}
}
'
$url = "https://msging.net/messages";
$headr = array();
$headr[] = 'Content-length: 0';
$headr[] = 'Content-type: application/json';
$headr[] = 'Authorization: Key '.$accesstoken;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER,$headr);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $str_data);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
var_dump(curl_exec($ch));
?>
A notificação não chega e me é retornado essa mensagem
{“code”:13,“description”:“The requested authentication scheme is not enabled”}bool(true)
Melhor resposta por Gabriel.Santos
Veja o original