-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
32 lines (27 loc) · 838 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"fmt"
"log"
greenapi "github.com/green-api/whatsapp-api-client-golang-v2"
)
func main() {
GreenAPI := greenapi.GreenAPI{
APIURL: "https://api.green-api.com",
MediaURL: "https://media.green-api.com",
IDInstance: "1101000001",
APITokenInstance: "d75b3a66374942c5b3c019c698abc2067e151558acbd412345",
}
response, err := GreenAPI.Statuses().SendTextStatus(
"Text of the status",
greenapi.OptionalFont("SERIF"),
greenapi.OptionalBackgroundColorText("#87CEEB"),
//greenapi.OptionalParticipantsTextStatus([]string{"[email protected]", "[email protected]"}),
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Status: %v %s \n\rResponse: %s\n\rTimestamp: %s\n\r", response.StatusCode,
response.StatusMessage,
response.Body,
response.Timestamp.Format("15:04:05.000"))
}