Consultar estado de mensaje

Consulta el estado actual de un mensaje enviado (pendiente, enviado, entregado, leido, error).

GET /api/mensaje_estado.php API Key

Parametros

Nombre Tipo Requerido Descripcion
key string Si API key del celular
msg_id string Si msg_id devuelto al enviar

Ejemplos de codigo

Listos para copiar y pegar. Cubre los 8 lenguajes mas usados.

<?php
// PHP + cURL
$ch = curl_init('https://api.multimensajes.com/api/mensaje-estado.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'key' => 'WA_8_a1b2c3d4e5f6g7h8',
    'msg_id' => 'a1b2c3d4-e5f6-7890',
]);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
import requests

response = requests.post(
    'https://api.multimensajes.com/api/mensaje-estado.php',
    data={
    'key': 'key': 'WA_8_a1b2c3d4e5f6g7h8',
    'msg_id': 'msg_id': 'a1b2c3d4-e5f6-7890'
    },
    timeout=30
)
data = response.json()
print(data)
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));

const params = new URLSearchParams();
params.append('key', 'WA_8_a1b2c3d4e5f6g7h8');
params.append('msg_id', 'a1b2c3d4-e5f6-7890');

const response = await fetch('https://api.multimensajes.com/api/mensaje-estado.php', {
    method: 'POST',
    body: params
});
const data = await response.json();
console.log(data);
curl -X POST 'https://api.multimensajes.com/api/mensaje-estado.php' \
  -d 'key=WA_8_a1b2c3d4e5f6g7h8' \
  -d 'msg_id=a1b2c3d4-e5f6-7890'
package main

import (
    "fmt"
    "net/url"
    "net/http"
    "io/ioutil"
)

func main() {
    form := url.Values{}
    form.Add("key", "WA_8_a1b2c3d4e5f6g7h8")
    form.Add("msg_id", "a1b2c3d4-e5f6-7890")

    resp, _ := http.PostForm("https://api.multimensajes.com/api/mensaje-estado.php", form)
    defer resp.Body.Close()
    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class WhatsAppAPI {
    public static void main(String[] args) throws Exception {
        URL url = new URL("https://api.multimensajes.com/api/mensaje-estado.php");
        HttpURLConnection con = (HttpURLConnection) url.openConnection();
        con.setRequestMethod("POST");
        con.setDoOutput(true);
        StringBuilder params = new StringBuilder();
        params.append("key=WA_8_a1b2c3d4e5f6g7h8\&");
        params.append("
        params.append("msg_id=a1b2c3d4-e5f6-7890\&");
        params.append("
        con.getOutputStream().write(params.toString().getBytes());
        BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
        String line;
        while ((line = in.readLine()) != null) System.out.println(line);
    }
}
require 'net/http'
require 'uri'
require 'json'

uri = URI('https://api.multimensajes.com/api/mensaje-estado.php')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

req = Net::HTTP::Post.new(uri.path)
req.set_form_data(
  'key' => 'WA_8_a1b2c3d4e5f6g7h8',
  'msg_id' => 'a1b2c3d4-e5f6-7890'
)

response = http.request(req)
puts JSON.parse(response.body)
using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    static async Task Main() {
        var client = new HttpClient();
        var form = new FormUrlEncodedContent(new[]
        {
            new KeyValuePair<string, string>("key", "WA_8_a1b2c3d4e5f6g7h8"),
            new KeyValuePair<string, string>("msg_id", "a1b2c3d4-e5f6-7890")
        });
        var response = await client.PostAsync("https://api.multimensajes.com/api/mensaje-estado.php", form);
        var content = await response.Content.ReadAsStringAsync();
        Console.WriteLine(content);
    }
}

Pruebalo tu mismo

Copia este comando y pegalo en tu terminal (necesitas curl):

curl -X POST 'https://api.multimensajes.com/api/mensaje-estado.php' \
  -d 'key=WA_8_a1b2c3d4e5f6g7h8' \
  -d 'msg_id=a1b2c3d4-e5f6-7890'

Endpoints relacionados