edutraini Posted April 7, 2022 Report Share Posted April 7, 2022 Bom dia Pessoal Alguem teria um exemplo de envio de sms no api da zenvia Agradeço Quote Link to comment Share on other sites More sharing options...
alex2002 Posted April 13, 2022 Report Share Posted April 13, 2022 Bom dia /// oWS := WebConnect():New() cTexto := ' ' cUser := 'nomedousuario' cSenha := 'senhaenviadapelazenvia' cTelefone := '5531991143593' cMensagem := 'Mensagem de Teste' cTexto := oWS:Open( 'https://api-http.zenvia.com/GatewayIntegration/msgSms.do?account='+cUser+'&code='+cSenha+'&dispatch=send&to='+cTelefone+'&msg='+cMensagem ) if len( cTexto ) >= 3 .and. substr(cTexto,1,3) = '000' lRetorno := .t. elseif len( cTexto ) >= 3 .and. substr(cTexto,1,3) = '990' MsgStop('Erro ao enviar SMS, possivelmente estourou a cota!'+CRLF+cTexto,'Erro' ) lRetorno := .f. elseif len( cTexto ) >= 3 .and. substr(cTexto,1,3) = '900' MsgStop('Erro ao enviar SMS, Erro de Autenticação!'+CRLF+cTexto,'Erro' ) lRetorno := .f. else lRetorno := .f. endif syswait(.2) sysrefresh() oWS:end() //// Trecho do meu código Deve te ajudar Um abraço, Alexandre Pereira Quote Link to comment Share on other sites More sharing options...
edutraini Posted April 14, 2022 Author Report Share Posted April 14, 2022 Puxa Alexandre Muito Obrigado Vou testar depois te falo Abraço Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.