Logo Lanfrica

EdwinWalela/africastalking-go

Domain:

digital infrastructure

Record type:

software
Creator:
Edw
Host:
Unofficial Golang SDK for the Africa's Talking API # Africa's Talking Golang SDK Unofficial Golang SDK for the Africa's Talking API with no external dependencies ## Install ```bash go get github.com ``` ## Quick Start: Sending an SMS This example makes use of the `sms` package to send bulk sms ```go package main import ( "fmt" "github.com" ) func main() { client := &Client{ ApiKey: os.Getenv("AT_API_KEY"), Username: os.Getenv("AT_USERNAME"), IsSandbox: true, } bulkRequest := &BulkRequest{ To: []string{"+254700000000","+254700000001","+254700000002"}, Message: "Hello AT", From: "", BulkSMSMode: true, RetryDuration: time.Hour, } response, err := client.SendBulk(bulkRequest) fmt.Println(response) } ``` ## Local development Clone repo ``` git clone github.com ``` Export Africa's talking credentials (sandbox) A caller ID is required for the Voice API. You can generate one on the sandbox dashboard under Voice > Create Number ```bash export AT_USERNAME=sandbox export AT_API_KEY=xxxxxxxxxxxxx export AT_CALLER_ID=+254xxxxxxxxx ``` Run tests ``` make test ``` ## Resources - Code Examples - Africa's Talking API Reference ## Features ### SMS - [x] Sending (Bulk & Premium) ### Airtime - [x] Sending ### Voice - [x] Call - [x] Transfer ## TODO ### SMS - [ ] Premium Subscriptions - [ ] Fetch Messages - [ ] Notifications ### USSD - [ ] Sessions - [ ] Notifications ### Airtime - [ ] Query ### Payments - [ ] C2B - [ ] B2C - [ ] B2B - [ ] Bank - [ ] Card - [ ] Query ### Mobile Data - [ ] Sending ## Contributing Any contribution, in the form of a suggestion, bug report or pull request, is well accepted.

Tags

Licenses