- API Reference
- Box API
- Modems
Read the phone number of a modem's SIM
Use this to find the SIM's phone number. Asks the modem for its own number (AT+CNUM or the modem API) and returns the request body with phone_number filled in. Many SIMs do not store their number, which gives the failure message. phone_number must be present and truthy in the request; without it the box answers HTTP 500.
/v2/get_dongle_infoRequest body application/json · required
Must be true.
Authentication
Needs dashboard Basic credentials when dashboard authentication is enabled; trusted callers (loopback, LAN unless "force auth for local" is on, whitelisted IP, allowed Tailscale) pass without them.
Responses
Number found or not.
The caller is not trusted (not loopback, LAN, whitelisted or allowed Tailscale) and sent no valid Basic credentials. The body depends on whether "Basic auth for all API" is on. Routes that also use the panel login can answer a plain-text 401 "Unauthorized Access" instead.
Unhandled error, for example a non-integer position or a missing required parameter.
Error name, e.g. internal_server_error or bad_request.
Errors returned in msg
| msg | Meaning | What to do |
|---|---|---|
Read dongle information Failed try again | The SIM does not store its number or the modem did not answer. | Get the number by USSD or from the carrier. |