SIMUB
Integrate SIMUB SMS and temporary mail activations with documented authentication, lifecycle, error handling and safe server-side examples.
Protected requests use the API key associated with your verified SIMUB account. Send it only over HTTPS and keep it in a server-side secret store or environment variable; never embed it in client code, a public repository or a screenshot. The SMSHub-compatible handler receives action as a parameter, while SIMUB SMS routes put it in the path. Choose one interface and parse its documented response format.
Call getBalance for available funds, getServices or getServicesList for current service codes, and getCountries for supported country codes. Choose getPrices, getPricesV2 or getPricesV3 for the response shape your integration expects. Catalogs, counts and prices are provider snapshots: cache them briefly, display the returned price when relevant and revalidate before purchase. Never invent a code from a visible label.
A purchase and a status check are different operations. Persist the activation identifier immediately so an application timeout does not lose a reserved number.
SMSHub-compatible actions can return text tokens, while newer routes may return JSON. Correct or rotate a BAD_KEY credential instead of retrying. BAD_SERVICE means an action or service is unsupported. NO_BALANCE requires funding; NO_NUMBERS means no matching offer is currently available; BAD_STATUS marks an invalid transition. After a timeout, reset or server error on getNumber, reconcile through the stored activation or status before purchasing again. A blind retry can create a duplicate reservation.
A ativação de e-mail usa rotas separadas e respostas JSON. Consulte getPriceRests, getPrices ou getRests para serviços, domínios, preços e estoque. Salve o mailId retornado por getActivation. Use getStatus para o estado e getCode para o código recebido. setStatus e requestRefund devem respeitar o estado atual e a política publicada. Uma caixa temporária não é uma caixa permanente nem um método seguro de recuperação.
Os valores abaixo são marcadores intencionalmente inválidos. Substitua-os apenas em um ambiente de servidor protegido. Os exemplos curl enviam parâmetros codificados separadamente sem montar manualmente uma URL.
Defina timeouts finitos, use recuo exponencial limitado ao consultar o status e pare em um estado final. Remova api_key, números, endereços e códigos dos logs. Valide respostas e limite compras simultâneas. Estoque, redes e filtros mudam; nem a disponibilidade nem a entrega do código são garantidas.
Em um gerenciador de segredos no servidor ou variável de ambiente protegida. Restrinja o acesso e nunca a inclua em logs ou código cliente.
Consulte em intervalo moderado com recuo limitado e pare ao receber uma resposta final.
Não. Ela apenas confirma a alocação do número; a entrega depende de redes externas e regras da plataforma.
Primeiro verifique pelos IDs salvos, histórico ou status se uma ativação já existe, evitando cobranças duplicadas.