Response envelope
code— an integer indicating whether the request succeeded or failed. Check this field before processingdata.message— a human-readable string accompanying the code. Useful for logging and debugging.data— the response payload. This field isnullor absent when the request fails.
code first. A 200 HTTP status does not guarantee a successful operation — errors are signalled through the code field, not the HTTP status.
Success codes
Error codes
Troubleshooting common issues
Token expired (-1)
Token expired (-1)
Your token has a fixed expiry. When you receive
code: -1, your current token is no longer accepted by the API.To recover:- Call
POST /api_order/loginwith your credentials to obtain a new token. - Update the token stored in your application.
- Retry the original request with the new token.
-1 response. The login response includes an expiry value you can use to schedule a refresh.Invalid signature (-30)
Invalid signature (-30)
The signature you sent does not match what the MIOeSIM server calculated. Work through the following checklist to find the mismatch:
- Parameter sorting — parameters must be sorted in ascending alphabetical order by key before building the signature string.
- Key appending — append your secret key directly to the end of the concatenated parameter string, with no separator. The format is
param1=value1param2=value2YOUR_SECRET_KEY. - MD5 encoding — the final signature must be the MD5 hash of the full string, expressed as a lowercase hexadecimal string.
- Excluded parameters — do not include the
signparameter itself in the string you hash. - Empty values — exclude parameters with empty or null values from the signature string.
- Encoding — ensure the string is UTF-8 encoded before hashing.
Missing parameters (-2)
Missing parameters (-2)
The request is missing one or more required fields. To resolve this:
- Check the endpoint’s parameter documentation and confirm all required fields are included in your request body.
- Verify that required string fields are non-empty strings — a field present but set to
""ornullwill trigger this error. - Check for typos in parameter names — the API performs exact key matching.
message field in the response may name the specific parameter that is missing or empty, which can speed up diagnosis.Access denied (400108 / 400109)
Access denied (400108 / 400109)
These error codes apply to the
getESIMDetail endpoint and indicate that access from your server is not permitted.- 400108 — IP not whitelisted: the request was made from an IP address that has not been approved for your account. Contact MIOeSIM and provide the IP address of your server. Once added to the whitelist, requests from that address will be accepted.
- 400109 — Access not supported: your account does not have permission to use
getESIMDetail. Contact MIOeSIM to request that this endpoint be enabled for your account.
