{"id":201,"date":"2026-11-03T15:30:00","date_gmt":"2026-11-03T10:00:00","guid":{"rendered":"https:\/\/proxykite.com\/blog\/?p=201"},"modified":"2026-11-14T16:52:26","modified_gmt":"2026-11-14T11:22:26","slug":"huawei-hilink-sms-api","status":"publish","type":"post","link":"https:\/\/proxykite.com\/blog\/huawei-hilink-sms-api\/","title":{"rendered":"Huawei HiLink SMS API: Read and Send SMS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The Huawei HiLink SMS API lets you read messages from a SIM in a compatible 4G dongle and send a single test message from that dongle. This guide starts with the local XML API on a Huawei E3372 HiLink, then shows how the same SMS workflow fits a Raspberry Pi proxy farm.<\/p>\n\n\n\n<aside class=\"ap-card\" aria-label=\"ProxyKite per-dongle licence\">\n<span class=\"ap-card__badge\">Farm-ready<\/span>\n<div class=\"ap-card__body\"><p class=\"ap-card__name\">ProxyKite per-dongle licence<\/p><p class=\"ap-card__best\">Best for anyone turning their own 4G\/LTE dongles + SIMs into HTTP\/SOCKS5 mobile proxies, from 1 dongle to hundreds<\/p><ul class=\"ap-card__features\"><li>Every dongle becomes an HTTP + SOCKS5 proxy on a public port of our cloud router \u2014 no static IP or port forwarding, works behind CGNAT<\/li><li>IP rotation on demand, by rotation link, or on a timer from 60 s to 7 days (sticky option); returns old + new IP<\/li><li>One-line installer on a Raspberry Pi \/ Linux box; Huawei E3372 HiLink is the reference stick<\/li><li>SIM inbox for carrier messages, bandwidth limits per day\/week\/month, live traffic insights<\/li><li>Sub-users, white-label (your logo\/colours), REST API, webhooks and Telegram alerts included<\/li><li>Flat price, traffic is free \u2014 rides on your own SIM data plans<\/li><\/ul><\/div>\n<div class=\"ap-card__side\"><p class=\"ap-card__price\">$9 per dongle <small>per month<\/small><\/p><a class=\"ap-card__btn\" href=\"https:\/\/proxykite.com\/#pricing\">Talk to us \u2192<\/a><\/div>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">What you need<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Prepare these items before you send a request:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A Huawei E3372 in HiLink mode, or a similar Huawei HiLink model.<\/li>\n\n\n<li>A SIM that you own or are authorized to operate, with SMS service enabled.<\/li>\n\n\n<li>A Linux computer or Raspberry Pi connected to the dongle. A single stick is enough for this test; a powered USB hub is useful for a farm.<\/li>\n\n\n<li>SSH or a local terminal with <code>curl<\/code>.<\/li>\n\n\n<li>The dongle&#8217;s local management address. Many HiLink devices use <code>192.168.8.1<\/code>, but the address can change with firmware or network setup.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">HiLink is different from a traditional serial USB modem. It exposes a small web interface and an HTTP API over its own USB Ethernet network. The <a href=\"https:\/\/pkg.go.dev\/github.com\/nerk\/hilink\" target=\"_blank\" rel=\"noopener\">Go HiLink package documentation<\/a> describes the same SMS operations and is a useful reference when you move from shell commands to application code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Confirm the dongle is in HiLink mode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: the API below is served by the HiLink web interface. A stick-mode modem that exposes only serial ports will not answer these URLs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set the base address and make two read-only requests:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BASE=http:\/\/192.168.8.1\n\ncurl -fsS \"$BASE\/api\/monitoring\/status\" | head\ncurl -fsS \"$BASE\/api\/sms\/sms-count\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The first response should contain device or network status. The second should return XML with SMS counts. If both requests fail, open the modem&#8217;s web interface in a browser at <code>http:\/\/192.168.8.1<\/code> and confirm the address shown by your USB network connection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like an XML response from the modem, not a timeout and not your computer&#8217;s normal internet login page. Do not flash firmware just to follow this guide; use the HiLink firmware already intended for your exact hardware revision.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Create a HiLink session and token<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: most older E3372 HiLink WebUIs expect a session cookie and a request-verification token on protected API calls. Fetch them together so the cookie and token belong to the same session.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run this in the same shell as the later commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>COOKIE=$(mktemp)\nTOKEN_XML=$(mktemp)\n\ncurl -fsS -c \"$COOKIE\" \"$BASE\/api\/webserver\/SesTokInfo\" &gt; \"$TOKEN_XML\"\nTOKEN=$(sed -n 's:.*&lt;TokInfo&gt;\\(.*\\)&lt;\/TokInfo&gt;.*:\\1:p' \"$TOKEN_XML\")\nSESSION=$(awk '$6 == \"SessionID\" {print $7}' \"$COOKIE\" | tail -n 1)\n\ntest -n \"$TOKEN\" &amp;&amp; test -n \"$SESSION\" &amp;&amp; echo \"HiLink session ready\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The final command should print <code>HiLink session ready<\/code>. Keep the cookie file and token private while you use them. They authorise requests to the local modem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some newer WebUIs use a challenge-login flow instead of returning a usable <code>SesTokInfo<\/code> response. If <code>TOKEN<\/code> or <code>SESSION<\/code> is empty, inspect the WebUI version and use the login sequence supported by that firmware or a maintained HiLink library. The SMS endpoint names and XML fields can vary between Huawei WebUI versions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Read received SMS messages<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: the inbox request is a paginated XML POST, not a normal JSON GET. <code>BoxType=1<\/code> selects the received-message box and <code>UnreadPreferred=1<\/code> puts unread messages first where the WebUI supports that flag.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Request the newest 20 messages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsS -X POST \"$BASE\/api\/sms\/sms-list\" \\\n  -b \"$COOKIE\" \\\n  -H \"__RequestVerificationToken: $TOKEN\" \\\n  -H \"Content-Type: text\/xml; charset=UTF-8\" \\\n  --data-binary @- &lt;&lt;'XML'\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;request&gt;\n  &lt;PageIndex&gt;1&lt;\/PageIndex&gt;\n  &lt;ReadCount&gt;20&lt;\/ReadCount&gt;\n  &lt;BoxType&gt;1&lt;\/BoxType&gt;\n  &lt;SortType&gt;0&lt;\/SortType&gt;\n  &lt;Ascending&gt;0&lt;\/Ascending&gt;\n  &lt;UnreadPreferred&gt;1&lt;\/UnreadPreferred&gt;\n&lt;\/request&gt;\nXML<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for the sender, message content, timestamp, read state, and the message <code>Index<\/code> in the XML response. Save the index if your application needs to mark a message as read or delete one after your retention policy allows it. Do not delete messages immediately if you still need them for an audit trail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/github.com\/kenshaw\/hilink\" target=\"_blank\" rel=\"noopener\">HiLink API implementation on GitHub<\/a> uses the same <code>api\/sms\/sms-list<\/code> route and documents the inbox request fields. Treat it as an implementation reference, not a guarantee that every E3372 WebUI exposes identical fields.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/proxykite.com\/blog\/wp-content\/uploads\/2026\/10\/huawei-hilink-sms-api-1.webp\" alt=\"ProxyKite SMS API reference showing the received-messages endpoint and its limit parameter.\"\/><figcaption class=\"wp-element-caption\">ProxyKite SMS API reference showing the received-messages endpoint and its limit parameter.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Send one SMS from the dongle<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: HiLink&#8217;s send operation also expects XML, including the recipient, message length, and a timestamp. Start with one short message to a number you control so you can verify the path without creating an unwanted messaging workflow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use a plain ASCII test message first. That keeps the character count predictable:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>TO='+15551234567'\nMESSAGE='HiLink test message.'\nNOW=$(date '+%Y-%m-%d %H:%M:%S')\nLENGTH=${#MESSAGE}\n\ncurl -fsS -X POST \"$BASE\/api\/sms\/send-sms\" \\\n  -b \"$COOKIE\" \\\n  -H \"__RequestVerificationToken: $TOKEN\" \\\n  -H \"Content-Type: text\/xml; charset=UTF-8\" \\\n  --data-binary @- &lt;&lt;XML\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;request&gt;\n  &lt;Index&gt;-1&lt;\/Index&gt;\n  &lt;Phones&gt;\n    &lt;Phone&gt;$TO&lt;\/Phone&gt;\n  &lt;\/Phones&gt;\n  &lt;Sca&gt;&lt;\/Sca&gt;\n  &lt;Content&gt;$MESSAGE&lt;\/Content&gt;\n  &lt;Length&gt;$LENGTH&lt;\/Length&gt;\n  &lt;Reserved&gt;1&lt;\/Reserved&gt;\n  &lt;Date&gt;$NOW&lt;\/Date&gt;\n  &lt;SendType&gt;0&lt;\/SendType&gt;\n&lt;\/request&gt;\nXML<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">An <code>OK<\/code> response means the modem accepted the request. It does not replace checking the send-status endpoint or the sent-message box. Keep the content XML-safe: do not place raw <code>&lt;<\/code>, <code>&gt;<\/code>, or <code>&amp;<\/code> characters in <code>$MESSAGE<\/code> unless your script escapes them first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Check the send status<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: the send request and delivery state are separate operations. Checking status gives your script a clear point at which to record an accepted or failed send.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Query the modem immediately after the send request:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsS \"$BASE\/api\/sms\/send-status\" \\\n  -b \"$COOKIE\" \\\n  -H \"__RequestVerificationToken: $TOKEN\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then query the sent box with <code>BoxType=2<\/code> if you need a local record of the message. For a production integration, store the request ID or message index returned by your chosen library, redact message bodies in logs, and make retries explicit so one network retry does not accidentally create a duplicate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Use SMS across a proxy farm<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: repeating local cookie handling, XML parsing, and device polling for every dongle creates unnecessary plumbing. A managed layer gives your application one authenticated API while each customer-owned SIM and dongle remains the source of its own SMS traffic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With ProxyKite, the SMS inbox is exposed through the cloud API for a proxy or dongle. The <a href=\"https:\/\/proxykite.com\/docs\/api\/sms\">SMS API reference<\/a> shows the JSON response, Bearer authentication, and the <code>limit<\/code> query parameter. A read request looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PROXY_ID='your-proxy-id'\nPROXYKITE_TOKEN='your-api-token'\n\ncurl \"https:\/\/proxykite.com\/api\/v1\/proxies\/$PROXY_ID\/sms?limit=10\" \\\n  -H \"Authorization: Bearer $PROXYKITE_TOKEN\" \\\n  -H \"Accept: application\/json\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use the send operation shown in the same API reference when your application needs to send from a SIM. Keep the token in an environment variable or secret store, not in a repository, screenshot, or customer-facing script.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like a JSON response scoped to the requested proxy or dongle, without exposing another device&#8217;s messages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The per-dongle licence is <strong>$9 per dongle per month<\/strong>. It includes SIM inbox for carrier messages, plus HTTP and SOCKS5 proxy access, limits, traffic insights, alerts, sub-users, white-label options, and a REST API. It is software and cloud routing for hardware and SIMs you own; it is not a SIM, dongle, mobile data plan, or bandwidth package.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are still assembling the hardware layer, read <a href=\"https:\/\/proxykite.com\/blog\/4g-proxy-farm-setup\/\">4G Proxy Farm Setup: Hardware, Power and Software<\/a> for the USB hub and Raspberry Pi layout. The broader <a href=\"https:\/\/proxykite.com\/blog\/build-your-own-mobile-proxy\/\">guide to building your own mobile proxy<\/a> explains how the dongle becomes a usable proxy after the network path is ready.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the complete flow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run this checklist before wiring SMS into an application:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>The Pi can reach the HiLink address and receives XML from <code>\/api\/sms\/sms-count<\/code>.<\/li>\n\n\n<li>The session cookie and token are created in the same shell session.<\/li>\n\n\n<li>The inbox request returns XML and shows the expected message index.<\/li>\n\n\n<li>A single test SMS is accepted, and <code>\/api\/sms\/send-status<\/code> is checked.<\/li>\n\n\n<li>The cloud request returns JSON with the expected proxy or dongle scope.<\/li>\n\n\n<li>Logs contain no full API token, cookie, phone number, or message body unless your retention policy requires it.<\/li>\n\n<\/ol>\n\n\n\n<aside class=\"ap-note\"><p>Use only SIMs, phone numbers, and accounts you own or are authorised to test. Keep SMS automation to legitimate QA and operational workflows, such as carrier balance or data-pack notices; do not automate bulk or unsolicited messages.<\/p><\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The modem returns HTML instead of XML<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You are probably using the wrong local address, or the device is not in HiLink mode. Open the modem&#8217;s web interface, check the USB network route, and repeat the request against the address assigned to the dongle. A serial-only stick requires a different integration and is outside this API example.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The request returns 403 or an empty token<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Fetch <code>SesTokInfo<\/code> again and use the new cookie and token together. Do not reuse a token after the WebUI session has expired. If the endpoint itself is absent, use the firmware&#8217;s challenge-login flow or a library that supports that WebUI generation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The inbox is empty<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check the SIM in a phone or the modem&#8217;s WebUI using a number and account you control. Confirm that the modem is registered on the network and that the SIM can receive SMS. Then request <code>sms-count<\/code> and <code>sms-list<\/code> again; an empty inbox is different from a failed API request.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Sending returns <code>OK<\/code>, but the message is not visible<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Query <code>send-status<\/code> and the sent box. Check the recipient format, keep the first test message short and ASCII, and make sure the <code>Date<\/code> value is current. Do not blindly retry a request until you know whether the first send was accepted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The farm API returns <code>401<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check the <code>Authorization: Bearer<\/code> header and the token&#8217;s scope. Keep the token in an environment variable, and replace it through your account controls if it has been exposed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">What is the Huawei HiLink SMS API endpoint for received messages?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">On the local HiLink WebUI, received messages are read with <code>POST \/api\/sms\/sms-list<\/code> and an XML body containing <code>BoxType=1<\/code>. You also need the session cookie and request-verification token expected by that modem&#8217;s WebUI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can a Huawei E3372 send SMS with curl?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, a compatible E3372 HiLink WebUI exposes <code>POST \/api\/sms\/send-sms<\/code>. Send one authorised test message with the recipient, content, length, and current date, then check <code>send-status<\/code> rather than treating the first response as final delivery proof.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is HiLink SMS the same as the ProxyKite SMS API?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. HiLink is the local XML interface between your computer and the dongle. ProxyKite provides an authenticated cloud JSON interface so an application can read and send SMS across managed dongles without implementing each local session flow itself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use this for QA testing?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, when the SIM, phone number, and app under test are yours or you have clear permission to test them. Keep the workflow limited to legitimate QA and operations, and protect the message contents and API credentials.<\/p>\n\n\n\n<aside class=\"ap-cta\" aria-label=\"Connect your HiLink fleet\"><div class=\"ap-cta__content\"><p class=\"ap-cta__eyebrow\">Build your farm<\/p><p class=\"ap-cta__title\">Connect your HiLink fleet<\/p><p class=\"ap-cta__text\">Ask about the $9 per dongle per month licence for your Raspberry Pi and Huawei HiLink setup.<\/p><\/div><a class=\"ap-cta__btn\" href=\"https:\/\/proxykite.com\/contact\">Contact us<\/a><\/aside>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"What is the Huawei HiLink SMS API endpoint for received messages?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"On the local HiLink WebUI, received messages are read with POST \/api\/sms\/sms-list and an XML body containing BoxType=1. You also need the session cookie and request-verification token expected by that modem's WebUI.\"}}, {\"@type\": \"Question\", \"name\": \"Can a Huawei E3372 send SMS with curl?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes, a compatible E3372 HiLink WebUI exposes POST \/api\/sms\/send-sms. Send one authorised test message with the recipient, content, length, and current date, then check send-status rather than treating the first response as final delivery proof.\"}}, {\"@type\": \"Question\", \"name\": \"Is HiLink SMS the same as the ProxyKite SMS API?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. HiLink is the local XML interface between your computer and the dongle. ProxyKite provides an authenticated cloud JSON interface so an application can read and send SMS across managed dongles without implementing each local session flow itself.\"}}, {\"@type\": \"Question\", \"name\": \"Can I use this for QA testing?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes, when the SIM, phone number, and app under test are yours or you have clear permission to test them. Keep the workflow limited to legitimate QA and operations, and protect the message contents and API credentials.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Learn the Huawei HiLink SMS API for reading the SIM inbox and sending one test SMS, with curl examples for an E3372, troubleshooting, and secure proxy-farm scaling.","protected":false},"author":1,"featured_media":202,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[1],"tags":[143,141,20,14,142],"class_list":["post-201","post","type-post","status-publish","format-standard","has-post-thumbnail","category-build-4g-proxy-farm","tag-e3372","tag-huawei-hilink","tag-mobile-proxies","tag-raspberry-pi","tag-sms-api","cs-entry"],"_links":{"self":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":2,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":546,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts\/201\/revisions\/546"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/media\/202"}],"wp:attachment":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}