Get a Free WhatsApp Business Account – Includes Onboarding, API Access & Sandbox. Apply Now!


Sample Code For Sending SMS in Go

Sending Voice using Authkey APIs is a breeze and lightning fast. You can simply pass the message body, message sender, mobile number & authkey in the API request to send sms instantly.

Go Sample Code For Send SMS



package main
import (
	"fmt"
	"net/http"
	"io/ioutil"
)
func main() {

	url := "https://api.authkey.io/request?authkey=AUTHKEY&mobile=RecepientMobile&country_code=
    CountryCode&sms=Hello%2C%20your%20OTP%20is%201234&sender=SENDERID"

	req, _ := http.NewRequest("GET", url, nil)


	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Sending SMS using Authkey APIs is a breeze and lightning fast. You can simply pass the message body, message sender, mobile number & authkey in the API request to send sms instantly.