
Official Go SDK for Authon — Software Licensing & Authentication Platform
Website • Docs • Discord • Status
go get github.com/authonpro/sdk-goOr copy authon.go into your project.
- Go 1.21+
- No external dependencies (stdlib only)
package main
import (
"fmt"
authon "github.com/authonpro/sdk-go"
)
func main() {
auth := authon.New("your-app-id", "your-api-key")
ok, _ := auth.Init()
if !ok {
fmt.Println("Connection failed")
return
}
result, _ := auth.Login("username", "password")
if result.Success {
fmt.Printf("Level: %d\n", auth.Level)
fmt.Printf("Expires: %s\n", auth.ExpiresAt)
} else {
fmt.Printf("Error: %s\n", result.Message)
}
auth.Logout()
}// Login
result, _ := auth.Login("user", "pass")
// License key
result, _ := auth.License("XXXXX-XXXXX-XXXXX-XXXXX")
// Register
result, _ := auth.Register("newuser", "pass", "LICENSE-KEY")
// Custom HWID
result, _ := auth.Login("user", "pass", "custom-hwid")// Variables
val, _ := auth.GetVar("key")
auth.SetVar("key", "value")
uvar, _ := auth.GetUserVar("key")
// File download
data, _ := auth.DownloadFile("file-id")
os.WriteFile("output.exe", data, 0644)
// Stats
auth.FetchOnline()
auth.FetchStats()
// Logging
auth.Log("User action")
// Session
valid, _ := auth.Check()
auth.Logout()cd example
go run main.go- 🌐 Website: https://authon.pro
- 📖 Docs: https://authon.pro/docs
- 💬 Discord: https://discord.gg/MTY79JDFm6
- 📊 Status: https://authon.pro/status
- 🔗 API Health: https://api.authon.pro/health
MIT