Created
          January 17, 2025 08:26 
        
      - 
      
- 
        Save adeisbright/dc6bc5b7317c587e094b692cbd482d6f to your computer and use it in GitHub Desktop. 
    An example on how to use termii for delivering sms
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const sendTokenWithTermii = async (message) => { | |
| const data = { | |
| "api_key" : Config.termiiToken, | |
| "message_type" : "NUMERIC", | |
| "to" : "+2348140850141", | |
| "from" : "Bigjara", | |
| "channel" : "dnd", | |
| "pin_attempts" : 10, | |
| "pin_time_to_live" : 5, | |
| "pin_length" : 4, | |
| "pin_placeholder" : "< 1234 >", | |
| "message_text" :message, | |
| "pin_type" : "NUMERIC" | |
| }; | |
| return await axios({ | |
| url : "https://api.ng.termii.com/api/sms/otp/send" , | |
| method : "post" , | |
| headers : { | |
| Accept : "application/json" | |
| } , | |
| data | |
| }) | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment