{"id":1351,"date":"2026-11-04T16:14:44","date_gmt":"2026-11-04T16:14:44","guid":{"rendered":"https:\/\/vectalk.com.br\/blog\/whatsapp-bot-golang-cloud-api\/"},"modified":"2026-11-04T16:14:48","modified_gmt":"2026-11-04T16:14:48","slug":"whatsapp-bot-golang-cloud-api","status":"publish","type":"post","link":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/","title":{"rendered":"WhatsApp Bot in Go with the Official Cloud API: Sending and Webhooks from Scratch"},"content":{"rendered":"\n<p><em>Updated on November 4, 2026<\/em><\/p>\n\n\n\n<p>To build a WhatsApp bot in Go on the official Cloud API, the standard library is all you need: a <code>net\/http<\/code> server with two routes on the same path, a <code>GET \/webhook<\/code> that echoes Meta&#8217;s verification challenge and a <code>POST \/webhook<\/code> that validates the body&#8217;s HMAC-SHA256 signature, returns 200 immediately and handles the message in a goroutine. Sending is a JSON <code>POST<\/code> to the Cloud API <code>\/messages<\/code> endpoint, for both text and templates. No SDK and no third-party dependencies: the whole bot fits in a single <code>main.go<\/code>.<\/p>\n\n\n\n<p>This tutorial gives you the complete code, for Go 1.22 or later, and walks through each part: verification, signature, a deduplicating queue, sending with retries, local testing and a Docker deploy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the bot works<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A customer messages your number.<\/li>\n\n\n<li>Meta sends a <code>POST<\/code> to your webhook with the JSON event and an <code>X-Hub-Signature-256<\/code> header.<\/li>\n\n\n<li>Your server validates the signature, returns <code>200<\/code> and pushes the event onto a queue (a <code>chan<\/code>).<\/li>\n\n\n<li>Workers read the queue, drop duplicates by message ID (<code>wamid<\/code>) and call the API to reply.<\/li>\n\n\n<li>Statuses (<code>sent<\/code>, <code>delivered<\/code>, <code>read<\/code>, <code>failed<\/code>) arrive on the same webhook and get logged.<\/li>\n\n<\/ol>\n\n\n\n<p>If you&#8217;ve seen our <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-python-fastapi\/\">Python with FastAPI<\/a> or <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-nodejs-express\/\">Node.js with Express<\/a> versions, the logic is the same. Go adds a small static binary, cheap goroutines and method-based routing in <code>http.ServeMux<\/code> since 1.22.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What you need first<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Variable<\/th><th>What it is<\/th><th>Where to find it<\/th><\/tr><\/thead><tbody><tr><td><code>ACCESS_TOKEN<\/code><\/td><td>System user access token<\/td><td>Business Settings &gt; System users<\/td><\/tr><tr><td><code>PHONE_NUMBER_ID<\/code><\/td><td>ID of the sending number<\/td><td>App Dashboard &gt; WhatsApp &gt; API Setup<\/td><\/tr><tr><td><code>VERIFY_TOKEN<\/code><\/td><td>A string you make up for verification<\/td><td>You set it and repeat it in the App Dashboard<\/td><\/tr><tr><td><code>APP_SECRET<\/code><\/td><td>App secret, used for the signature<\/td><td>App Dashboard &gt; Settings &gt; Basic<\/td><\/tr><tr><td><code>PORT<\/code><\/td><td>HTTP port (default 8080)<\/td><td>You set it<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Use a permanent system user token, not the temporary one from the dashboard. Your webhook also needs HTTPS with a valid certificate: the <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/create-webhook-endpoint\" target=\"_blank\" rel=\"noreferrer noopener\">webhook endpoint docs<\/a> state that self-signed certificates aren&#8217;t supported.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Set up the project<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">mkdir whatsapp-bot-go &amp;&amp; cd whatsapp-bot-go\ngo mod init whatsapp-bot-go<\/code><\/pre>\n\n\n\n<p><code>go.mod<\/code> only needs to declare the minimum version, 1.22, because of the method patterns in the router (<code>\"GET \/webhook\"<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-text\">module whatsapp-bot-go\n\ngo 1.22<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. The complete code<\/h2>\n\n\n\n<p>Save this as <code>main.go<\/code>. The sections below explain each part.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-go\">package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto\/hmac\"\n\t\"crypto\/sha256\"\n\t\"encoding\/hex\"\n\t\"encoding\/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net\/http\"\n\t\"os\"\n\t\"os\/signal\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"time\"\n)\n\ntype Config struct {\n\tVerifyToken   string\n\tAppSecret     string\n\tAccessToken   string\n\tPhoneNumberID string\n\tAPIURL        string\n\tWebhookKey    string\n\tPort          string\n}\n\nfunc loadConfig() Config {\n\tc := Config{\n\t\tVerifyToken:   os.Getenv(\"VERIFY_TOKEN\"),\n\t\tAppSecret:     os.Getenv(\"APP_SECRET\"),\n\t\tAccessToken:   os.Getenv(\"ACCESS_TOKEN\"),\n\t\tPhoneNumberID: os.Getenv(\"PHONE_NUMBER_ID\"),\n\t\tAPIURL:        os.Getenv(\"API_URL\"),\n\t\tWebhookKey:    os.Getenv(\"WEBHOOK_KEY\"),\n\t\tPort:          os.Getenv(\"PORT\"),\n\t}\n\tif c.APIURL == \"\" {\n\t\tc.APIURL = \"https:\/\/graph.facebook.com\/v26.0\/\" + c.PhoneNumberID + \"\/messages\"\n\t}\n\tif c.Port == \"\" {\n\t\tc.Port = \"8080\"\n\t}\n\treturn c\n}\n\n\/\/ ---------- webhook types ----------\n\ntype WebhookPayload struct {\n\tObject string  `json:\"object\"`\n\tEntry  []Entry `json:\"entry\"`\n}\n\ntype Entry struct {\n\tID      string   `json:\"id\"`\n\tChanges []Change `json:\"changes\"`\n}\n\ntype Change struct {\n\tField string `json:\"field\"`\n\tValue Value  `json:\"value\"`\n}\n\ntype Value struct {\n\tMetadata struct {\n\t\tPhoneNumberID string `json:\"phone_number_id\"`\n\t} `json:\"metadata\"`\n\tMessages []Message `json:\"messages\"`\n\tStatuses []Status  `json:\"statuses\"`\n}\n\ntype Message struct {\n\tFrom string `json:\"from\"`\n\tID   string `json:\"id\"`\n\tType string `json:\"type\"`\n\tText *struct {\n\t\tBody string `json:\"body\"`\n\t} `json:\"text,omitempty\"`\n}\n\ntype Status struct {\n\tID          string `json:\"id\"`\n\tStatus      string `json:\"status\"`\n\tRecipientID string `json:\"recipient_id\"`\n\tErrors      []struct {\n\t\tCode  int    `json:\"code\"`\n\t\tTitle string `json:\"title\"`\n\t} `json:\"errors,omitempty\"`\n}\n\n\/\/ ---------- send client ----------\n\ntype Client struct {\n\tcfg  Config\n\thttp *http.Client\n}\n\ntype APIError struct {\n\tStatus  int\n\tCode    int\n\tMessage string\n}\n\nfunc (e *APIError) Error() string {\n\treturn fmt.Sprintf(\"api http %d, code %d: %s\", e.Status, e.Code, e.Message)\n}\n\n\/\/ 130429 = throughput limit; 5xx = temporary instability\nfunc (e *APIError) retryable() bool { return e.Status &gt;= 500 || e.Code == 130429 }\n\nfunc (c *Client) post(ctx context.Context, payload any) (string, error) {\n\tbody, err := json.Marshal(payload)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar lastErr error\n\tfor attempt := 0; attempt &lt; 3; attempt++ {\n\t\tif attempt &gt; 0 {\n\t\t\ttime.Sleep(time.Duration(attempt*attempt) * time.Second)\n\t\t}\n\t\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, c.cfg.APIURL, bytes.NewReader(body))\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treq.Header.Set(\"Authorization\", \"Bearer \"+c.cfg.AccessToken)\n\t\treq.Header.Set(\"Content-Type\", \"application\/json\")\n\n\t\tresp, err := c.http.Do(req)\n\t\tif err != nil {\n\t\t\tlastErr = err\n\t\t\tcontinue\n\t\t}\n\t\traw, _ := io.ReadAll(resp.Body)\n\t\tresp.Body.Close()\n\n\t\tif resp.StatusCode == http.StatusOK {\n\t\t\tvar out struct {\n\t\t\t\tMessages []struct {\n\t\t\t\t\tID string `json:\"id\"`\n\t\t\t\t} `json:\"messages\"`\n\t\t\t}\n\t\t\tif err := json.Unmarshal(raw, &amp;out); err != nil || len(out.Messages) == 0 {\n\t\t\t\treturn \"\", fmt.Errorf(\"unexpected response: %s\", raw)\n\t\t\t}\n\t\t\treturn out.Messages[0].ID, nil\n\t\t}\n\t\tvar ge struct {\n\t\t\tError struct {\n\t\t\t\tCode    int    `json:\"code\"`\n\t\t\t\tMessage string `json:\"message\"`\n\t\t\t} `json:\"error\"`\n\t\t}\n\t\t_ = json.Unmarshal(raw, &amp;ge)\n\t\tapiErr := &amp;APIError{Status: resp.StatusCode, Code: ge.Error.Code, Message: ge.Error.Message}\n\t\tif !apiErr.retryable() {\n\t\t\treturn \"\", apiErr \/\/ request error: retrying won't help\n\t\t}\n\t\tlastErr = apiErr\n\t}\n\treturn \"\", lastErr\n}\n\nfunc (c *Client) SendText(ctx context.Context, to, body string) (string, error) {\n\treturn c.post(ctx, map[string]any{\n\t\t\"messaging_product\": \"whatsapp\",\n\t\t\"to\":                to,\n\t\t\"type\":              \"text\",\n\t\t\"text\":              map[string]any{\"body\": body},\n\t})\n}\n\nfunc (c *Client) SendTemplate(ctx context.Context, to, name, lang string, params ...string) (string, error) {\n\ttpl := map[string]any{\n\t\t\"name\":     name,\n\t\t\"language\": map[string]string{\"code\": lang},\n\t}\n\tif len(params) &gt; 0 {\n\t\tps := make([]map[string]string, len(params))\n\t\tfor i, p := range params {\n\t\t\tps[i] = map[string]string{\"type\": \"text\", \"text\": p}\n\t\t}\n\t\ttpl[\"components\"] = []map[string]any{{\"type\": \"body\", \"parameters\": ps}}\n\t}\n\treturn c.post(ctx, map[string]any{\n\t\t\"messaging_product\": \"whatsapp\",\n\t\t\"to\":                to,\n\t\t\"type\":              \"template\",\n\t\t\"template\":          tpl,\n\t})\n}\n\n\/\/ ---------- webhook ----------\n\ntype Server struct {\n\tcfg    Config\n\tclient *Client\n\tjobs   chan Value\n\tseen   sync.Map \/\/ wamid -&gt; time.Time\n}\n\nfunc (s *Server) verify(w http.ResponseWriter, r *http.Request) {\n\tq := r.URL.Query()\n\tif q.Get(\"hub.mode\") == \"subscribe\" &amp;&amp; q.Get(\"hub.verify_token\") == s.cfg.VerifyToken {\n\t\tw.WriteHeader(http.StatusOK)\n\t\tio.WriteString(w, q.Get(\"hub.challenge\"))\n\t\treturn\n\t}\n\thttp.Error(w, \"forbidden\", http.StatusForbidden)\n}\n\nfunc validSignature(body []byte, header, secret string) bool {\n\tsig, ok := strings.CutPrefix(header, \"sha256=\")\n\tif !ok {\n\t\treturn false\n\t}\n\tgot, err := hex.DecodeString(sig)\n\tif err != nil {\n\t\treturn false\n\t}\n\tmac := hmac.New(sha256.New, []byte(secret))\n\tmac.Write(body)\n\treturn hmac.Equal(got, mac.Sum(nil))\n}\n\nfunc (s *Server) receive(w http.ResponseWriter, r *http.Request) {\n\tbody, err := io.ReadAll(http.MaxBytesReader(w, r.Body, 4&lt;&lt;20))\n\tif err != nil {\n\t\thttp.Error(w, \"bad request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tswitch {\n\tcase s.cfg.AppSecret != \"\":\n\t\tif !validSignature(body, r.Header.Get(\"X-Hub-Signature-256\"), s.cfg.AppSecret) {\n\t\t\thttp.Error(w, \"invalid signature\", http.StatusUnauthorized)\n\t\t\treturn\n\t\t}\n\tcase s.cfg.WebhookKey != \"\":\n\t\tif !hmac.Equal([]byte(r.URL.Query().Get(\"key\")), []byte(s.cfg.WebhookKey)) {\n\t\t\thttp.Error(w, \"unauthorized\", http.StatusUnauthorized)\n\t\t\treturn\n\t\t}\n\tdefault:\n\t\thttp.Error(w, \"webhook protection not configured\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tvar p WebhookPayload\n\tif err := json.Unmarshal(body, &amp;p); err != nil {\n\t\thttp.Error(w, \"bad json\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tw.WriteHeader(http.StatusOK) \/\/ acknowledge before processing\n\n\tfor _, e := range p.Entry {\n\t\tfor _, ch := range e.Changes {\n\t\t\tif ch.Field != \"messages\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tselect {\n\t\t\tcase s.jobs &lt;- ch.Value:\n\t\t\tdefault:\n\t\t\t\tlog.Println(\"queue full, event dropped\")\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (s *Server) firstTime(wamid string) bool {\n\t_, loaded := s.seen.LoadOrStore(wamid, time.Now())\n\treturn !loaded\n}\n\nfunc (s *Server) cleanSeen(ctx context.Context) {\n\tt := time.NewTicker(10 * time.Minute)\n\tdefer t.Stop()\n\tfor {\n\t\tselect {\n\t\tcase &lt;-ctx.Done():\n\t\t\treturn\n\t\tcase &lt;-t.C:\n\t\t\ts.seen.Range(func(k, v any) bool {\n\t\t\t\tif time.Since(v.(time.Time)) &gt; 24*time.Hour {\n\t\t\t\t\ts.seen.Delete(k)\n\t\t\t\t}\n\t\t\t\treturn true\n\t\t\t})\n\t\t}\n\t}\n}\n\nfunc (s *Server) worker(ctx context.Context) {\n\tfor v := range s.jobs {\n\t\tfor _, m := range v.Messages {\n\t\t\tif !s.firstTime(m.ID) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ts.handleMessage(ctx, m)\n\t\t}\n\t\tfor _, st := range v.Statuses {\n\t\t\tif st.Status == \"failed\" &amp;&amp; len(st.Errors) &gt; 0 {\n\t\t\t\tlog.Printf(\"failed %s to %s: %d %s\", st.ID, st.RecipientID, st.Errors[0].Code, st.Errors[0].Title)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (s *Server) handleMessage(ctx context.Context, m Message) {\n\tctx, cancel := context.WithTimeout(ctx, 30*time.Second)\n\tdefer cancel()\n\n\tvar reply string\n\tswitch {\n\tcase m.Type == \"text\" &amp;&amp; m.Text != nil:\n\t\ttxt := strings.ToLower(strings.TrimSpace(m.Text.Body))\n\t\tswitch txt {\n\t\tcase \"hi\", \"hello\", \"menu\":\n\t\t\treply = \"Hi! Type 1 for opening hours, 2 to talk to our team.\"\n\t\tcase \"1\":\n\t\t\treply = \"We're open Monday to Friday, 9 am to 6 pm.\"\n\t\tcase \"2\":\n\t\t\treply = \"Got it! Someone from our team will reply shortly.\"\n\t\tdefault:\n\t\t\treply = \"You said: \" + m.Text.Body + \"\\nType menu to see the options.\"\n\t\t}\n\tdefault:\n\t\treply = \"For now I only understand text messages. Type menu.\"\n\t}\n\n\tif _, err := s.client.SendText(ctx, m.From, reply); err != nil {\n\t\tvar apiErr *APIError\n\t\tif errors.As(err, &amp;apiErr) {\n\t\t\tlog.Printf(\"API error replying to %s: %v\", m.From, apiErr)\n\t\t\treturn\n\t\t}\n\t\tlog.Printf(\"network error replying to %s: %v\", m.From, err)\n\t}\n}\n\n\/\/ ---------- main ----------\n\nfunc main() {\n\tcfg := loadConfig()\n\tclient := &amp;Client{cfg: cfg, http: &amp;http.Client{Timeout: 15 * time.Second}}\n\n\t\/\/ CLI mode: go run . template 15551234567 order_shipped en_US Ana \"#4821\"\n\tif len(os.Args) &gt;= 5 &amp;&amp; os.Args[1] == \"template\" {\n\t\tid, err := client.SendTemplate(context.Background(), os.Args[2], os.Args[3], os.Args[4], os.Args[5:]...)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tfmt.Println(\"sent:\", id)\n\t\treturn\n\t}\n\n\tctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)\n\tdefer stop()\n\n\ts := &amp;Server{cfg: cfg, client: client, jobs: make(chan Value, 1000)}\n\tfor i := 0; i &lt; 4; i++ {\n\t\tgo s.worker(ctx)\n\t}\n\tgo s.cleanSeen(ctx)\n\n\tmux := http.NewServeMux()\n\tmux.HandleFunc(\"GET \/webhook\", s.verify)\n\tmux.HandleFunc(\"POST \/webhook\", s.receive)\n\tmux.HandleFunc(\"GET \/healthz\", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) })\n\n\tsrv := &amp;http.Server{\n\t\tAddr:              \":\" + cfg.Port,\n\t\tHandler:           mux,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tReadTimeout:       15 * time.Second,\n\t\tWriteTimeout:      15 * time.Second,\n\t}\n\n\tgo func() {\n\t\tlog.Printf(\"listening on :%s\", cfg.Port)\n\t\tif err := srv.ListenAndServe(); err != nil &amp;&amp; !errors.Is(err, http.ErrServerClosed) {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}()\n\n\t&lt;-ctx.Done()\n\tshutdownCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)\n\tdefer cancel()\n\tsrv.Shutdown(shutdownCtx)\n\tclose(s.jobs)\n\tlog.Println(\"stopped\")\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Webhook verification (GET)<\/h2>\n\n\n\n<p>When you register the URL in the App Dashboard, Meta sends a <code>GET<\/code> with three parameters: <code>hub.mode<\/code> (always <code>subscribe<\/code>), <code>hub.verify_token<\/code> (the string you typed in the dashboard) and <code>hub.challenge<\/code> (a number). Your server checks the token and returns the raw <code>hub.challenge<\/code> with status 200. Any other response fails verification. That&#8217;s what the <code>verify<\/code> function does.<\/p>\n\n\n\n<p>Common mistakes: returning the challenge as JSON (<code>{\"challenge\": \"123\"}<\/code>) instead of plain text, or comparing against the access token instead of <code>VERIFY_TOKEN<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. HMAC signature (X-Hub-Signature-256)<\/h2>\n\n\n\n<p>Every <code>POST<\/code> from Meta carries an <code>X-Hub-Signature-256: sha256=&lt;hex&gt;<\/code> header: an HMAC-SHA256 of the raw body computed with your app secret. The <code>validSignature<\/code> function:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>strips the <code>sha256=<\/code> prefix with <code>strings.CutPrefix<\/code>;<\/li>\n\n\n<li>decodes the hex;<\/li>\n\n\n<li>computes the body&#8217;s HMAC with <code>crypto\/hmac<\/code> and <code>crypto\/sha256<\/code>;<\/li>\n\n\n<li>compares with <code>hmac.Equal<\/code>, which runs in constant time and prevents timing attacks.<\/li>\n\n<\/ol>\n\n\n\n<p>The key point: the hash must be computed over the <strong>exact bytes<\/strong> received. That&#8217;s why the handler reads the whole body with <code>io.ReadAll<\/code> before any <code>json.Unmarshal<\/code>. If you decode first and re-serialize, key order and whitespace change and the signature never matches. <code>http.MaxBytesReader<\/code> caps the body at 4 MB; the <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">webhooks overview<\/a> says payloads can be up to 3 MB.<\/p>\n\n\n\n<p>The other classic mistake is the wrong key: the signature uses the app secret, not the access token or <code>VERIFY_TOKEN<\/code>. The full topic, with tests and other languages, is in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-signature-validation\/\">WhatsApp webhook signature validation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Acknowledge fast, process later<\/h2>\n\n\n\n<p>Meta expects a 200, and if it doesn&#8217;t get one it retries: immediately, then a few more times over 7 days. Batches can carry up to 1,000 updates, and the docs themselves recommend handling each <code>POST<\/code> independently and deduplicating. So the handler:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>validates, decodes and returns <code>200<\/code> before any outbound call;<\/li>\n\n\n<li>pushes each <code>change<\/code> with <code>field == \"messages\"<\/code> onto a channel buffered for 1,000 items;<\/li>\n\n\n<li>logs and drops the event if the channel is full, instead of blocking the response.<\/li>\n\n<\/ul>\n\n\n\n<p>Four <code>worker<\/code> goroutines consume the channel. Deduplication uses a <code>sync.Map<\/code> keyed by <code>wamid<\/code>, with a cleanup every 10 minutes for IDs older than 24 hours. For a single process, that&#8217;s enough. With several replicas behind a load balancer, swap the <code>sync.Map<\/code> for a Redis key or a database unique constraint, and the channel for a real queue. The full design, with idempotency and retries, is in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-api-integration-architecture\/\">integration architecture<\/a>.<\/p>\n\n\n\n<p>On shutdown, <code>signal.NotifyContext<\/code> catches <code>SIGTERM<\/code>, <code>srv.Shutdown<\/code> waits for in-flight requests and only then is the channel closed, which stops the workers. The process doesn&#8217;t wait for the queue to empty: events that already got a 200 and were still in the channel are lost, and Meta won&#8217;t resend them. If that matters, write each event to a persistent queue before responding.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. Sending text and templates<\/h2>\n\n\n\n<p><code>Client<\/code> has a single low-level method, <code>post<\/code>, that serializes the payload, calls <code>API_URL<\/code> with the token in the <code>Authorization<\/code> header and reads the <code>wamid<\/code> from the response. On top of it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>SendText<\/code><\/strong> builds <code>{\"type\": \"text\", \"text\": {\"body\": ...}}<\/code>. Free-form text can only be sent inside the 24-hour window opened by the customer&#8217;s last message.<\/li>\n\n\n<li><strong><code>SendTemplate<\/code><\/strong> builds <code>{\"type\": \"template\", \"template\": {\"name\", \"language\": {\"code\"}, \"components\"}}<\/code>, with body parameters in the order of the <code>{{1}}<\/code>, <code>{{2}}<\/code>&#8230; variables. Outside the window, approved templates only.<\/li>\n\n<\/ul>\n\n\n\n<p><code>main<\/code> also works as a command-line tool to send a template, handy for testing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">export ACCESS_TOKEN=... PHONE_NUMBER_ID=...\ngo run . template 15551234567 order_shipped en_US Ana \"#4821\"\n# sent: wamid.HBgLMTU1NTEyMzQ1NjcVAgARGBI...<\/code><\/pre>\n\n\n\n<p>Template formats with header media, buttons and dynamic URLs are covered in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/send-whatsapp-template-message-api\/\">how to send a WhatsApp template message via API<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Retries: when to repeat and when not to<\/h3>\n\n\n\n<p>Meta&#8217;s API returns errors in the body as <code>{\"error\": {\"code\": ..., \"message\": ...}}<\/code>. The code reads that <code>code<\/code> and only retries (up to 3 attempts, waiting 1 s and then 4 s) in two cases:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>HTTP 5xx<\/strong>, temporary instability;<\/li>\n\n\n<li><strong>code 130429<\/strong>, the number&#8217;s throughput limit.<\/li>\n\n<\/ul>\n\n\n\n<p>Request errors, such as wrong template parameters (132000) or sending outside the window (131047), return right away, since repeating won&#8217;t help. Error 131056, too many messages to the same recipient in a short time, also stays out of the immediate retry: it calls for a longer pause.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. Test locally<\/h2>\n\n\n\n<p>Run the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">export VERIFY_TOKEN=my-token APP_SECRET=my-secret ACCESS_TOKEN=... PHONE_NUMBER_ID=...\ngo run .<\/code><\/pre>\n\n\n\n<p>Test verification, which should return <code>123<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">curl \"http:\/\/localhost:8080\/webhook?hub.mode=subscribe&amp;hub.verify_token=my-token&amp;hub.challenge=123\"<\/code><\/pre>\n\n\n\n<p>Test the signature by generating the HMAC with <code>openssl<\/code>. With the right secret you get 200; with anything else, 401:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">BODY='{\"object\":\"whatsapp_business_account\",\"entry\":[]}'\nSIG=$(printf '%s' \"$BODY\" | openssl dgst -sha256 -hmac \"my-secret\" | awk '{print $2}')\ncurl -i -X POST http:\/\/localhost:8080\/webhook \\\n  -H \"Content-Type: application\/json\" \\\n  -H \"X-Hub-Signature-256: sha256=$SIG\" \\\n  -d \"$BODY\"<\/code><\/pre>\n\n\n\n<p>To receive real Meta events on your machine, expose the port through an HTTPS tunnel and register the public URL in the App Dashboard, subscribing to the <code>messages<\/code> field. Step by step in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/test-whatsapp-webhook-locally\/\">test your WhatsApp webhook locally with ngrok<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. Deploy with Docker<\/h2>\n\n\n\n<p>A two-stage <code>Dockerfile<\/code> produces a small image containing only the static binary:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-dockerfile\"># Dockerfile\nFROM golang:1.22-alpine AS build\nWORKDIR \/src\nCOPY go.mod .\/\nCOPY *.go .\/\nRUN CGO_ENABLED=0 go build -o \/bot .\n\nFROM gcr.io\/distroless\/static-debian12\nCOPY --from=build \/bot \/bot\nEXPOSE 8080\nENTRYPOINT [\"\/bot\"]<\/code><\/pre>\n\n\n\n<p>The <code>distroless\/static<\/code> image ships with CA certificates, which you need to call the API over HTTPS. Put the container behind a reverse proxy or load balancer with a valid TLS certificate and pass environment variables through your platform&#8217;s secret manager, never baked into the image. The <code>GET \/healthz<\/code> route is there for health checks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pre-production checklist<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Permanent system user token, stored as a secret.<\/li>\n\n\n<li><code>APP_SECRET<\/code> set and the signature validated on every <code>POST<\/code>.<\/li>\n\n\n<li>HTTPS with a valid certificate.<\/li>\n\n\n<li>Shared deduplication (Redis or database) if you run more than one replica.<\/li>\n\n\n<li>Messages and statuses written to a database, if you need history.<\/li>\n\n\n<li>Approved templates for anything sent outside the 24-hour window.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to do this with Vectalk<\/h2>\n\n\n\n<p>Vectalk is a proxy for the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/official-whatsapp-api\/\">official WhatsApp Business API<\/a>: send payloads and webhook events are the same as Meta&#8217;s, so <code>main.go<\/code> works without logic changes. Three variables change:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>API_URL<\/code><\/strong>: set it to <code>https:\/\/apis.vectalk.com.br\/api\/messages<\/code> and use a Vectalk instance token as <code>ACCESS_TOKEN<\/code>. With it, the <code>phone_number_id<\/code> is resolved automatically (<a href=\"https:\/\/docs.vectalk.com.br\/quickstart.md\">quickstart<\/a>).<\/li>\n\n\n<li><strong>Webhook registration<\/strong>: register the URL with <code>POST https:\/\/apis.vectalk.com.br\/api\/webhooks<\/code>, passing <code>instance_id<\/code>, <code>url<\/code> and <code>name<\/code>. You can have several URLs per instance.<\/li>\n\n\n<li><strong>Endpoint protection<\/strong>: the <a href=\"https:\/\/docs.vectalk.com.br\/concepts\/webhooks.md\">Vectalk webhook docs<\/a> don&#8217;t describe a signature header. Leave <code>APP_SECRET<\/code> empty, set <code>WEBHOOK_KEY<\/code> to a long random value and register the URL as <code>https:\/\/bot.yourcompany.com\/webhook?key=YOUR_VALUE<\/code>. The code already handles this case and rejects requests without the key.<\/li>\n\n<\/ol>\n\n\n\n<p>The Hub expects a <code>200<\/code> within 20 seconds and retries the event if it doesn&#8217;t get one, which deduplication already covers. <a href=\"https:\/\/apps.vectalk.com.br\/register\">Create your account<\/a> and browse the other endpoints in the <a href=\"https:\/\/docs.vectalk.com.br\">docs<\/a>. If you work in PHP, there&#8217;s a <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-api-php-laravel\/\">Laravel version of this tutorial<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Why does the signature never match?<\/h3>\n\n\n\n<p>It&#8217;s almost always one of two things: the HMAC was computed over re-serialized JSON instead of the original bytes, or the key isn&#8217;t the app secret.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need Go 1.22?<\/h3>\n\n\n\n<p>For the code as written, yes, because of the <code>\"GET \/webhook\"<\/code> and <code>\"POST \/webhook\"<\/code> patterns in <code>http.ServeMux<\/code>. On older versions, use a single route and check <code>r.Method<\/code> inside the handler.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I reply with text at any time?<\/h3>\n\n\n\n<p>No. Free-form text only works inside the 24-hour window opened by the customer&#8217;s last message. Outside it, send an approved template with <code>SendTemplate<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I scale to multiple replicas?<\/h3>\n\n\n\n<p>Replace in-memory deduplication with Redis or a database, and the channel with an external queue. The HTTP handler stays the same.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Official sources checked on November 4, 2026:<\/strong> <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/create-webhook-endpoint\" target=\"_blank\" rel=\"noreferrer noopener\">Create a webhook endpoint (Meta)<\/a>, <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Webhooks overview (Meta)<\/a>, <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/support\/error-codes\" target=\"_blank\" rel=\"noreferrer noopener\">Error codes (Meta)<\/a>, <a href=\"https:\/\/pkg.go.dev\/net\/http\" target=\"_blank\" rel=\"noreferrer noopener\">net\/http package (Go)<\/a>, <a href=\"https:\/\/pkg.go.dev\/crypto\/hmac\" target=\"_blank\" rel=\"noreferrer noopener\">crypto\/hmac package (Go)<\/a>, <a href=\"https:\/\/docs.vectalk.com.br\/quickstart.md\">Vectalk quickstart<\/a>, <a href=\"https:\/\/docs.vectalk.com.br\/concepts\/webhooks.md\">Vectalk webhooks<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A complete tutorial for a WhatsApp bot in Go on the official Cloud API, standard library only: webhook, HMAC signature, text and template sending, and Docker deploy.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-1351","post","type-post","status-publish","format-standard","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WhatsApp API with Golang: Bot from Scratch | Vectalk<\/title>\n<meta name=\"description\" content=\"WhatsApp API with Golang: build a bot from scratch with net\/http, webhook verification, HMAC signature, text and template sending, retries and Docker.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WhatsApp API with Golang: Bot from Scratch | Vectalk\" \/>\n<meta property=\"og:description\" content=\"WhatsApp API with Golang: build a bot from scratch with net\/http, webhook verification, HMAC signature, text and template sending, retries and Docker.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Vectalk\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-04T16:14:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-04T16:14:48+00:00\" \/>\n<meta name=\"author\" content=\"wanderleyfcunha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"wanderleyfcunha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/\"},\"author\":{\"name\":\"wanderleyfcunha\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"headline\":\"WhatsApp Bot in Go with the Official Cloud API: Sending and Webhooks from Scratch\",\"datePublished\":\"2026-11-04T16:14:44+00:00\",\"dateModified\":\"2026-11-04T16:14:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/\"},\"wordCount\":1428,\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/\",\"url\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/\",\"name\":\"WhatsApp API with Golang: Bot from Scratch | Vectalk\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#website\"},\"datePublished\":\"2026-11-04T16:14:44+00:00\",\"dateModified\":\"2026-11-04T16:14:48+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"description\":\"WhatsApp API with Golang: build a bot from scratch with net\\\/http, webhook verification, HMAC signature, text and template sending, retries and Docker.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-bot-golang-cloud-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WhatsApp Bot in Go with the Official Cloud API: Sending and Webhooks from Scratch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/\",\"name\":\"Blog Vectalk\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\",\"name\":\"wanderleyfcunha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"caption\":\"wanderleyfcunha\"},\"sameAs\":[\"https:\\\/\\\/vectalk.com.br\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WhatsApp API with Golang: Bot from Scratch | Vectalk","description":"WhatsApp API with Golang: build a bot from scratch with net\/http, webhook verification, HMAC signature, text and template sending, retries and Docker.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/","og_locale":"en_US","og_type":"article","og_title":"WhatsApp API with Golang: Bot from Scratch | Vectalk","og_description":"WhatsApp API with Golang: build a bot from scratch with net\/http, webhook verification, HMAC signature, text and template sending, retries and Docker.","og_url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/","og_site_name":"Blog Vectalk","article_published_time":"2026-11-04T16:14:44+00:00","article_modified_time":"2026-11-04T16:14:48+00:00","author":"wanderleyfcunha","twitter_card":"summary_large_image","twitter_misc":{"Written by":"wanderleyfcunha","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/#article","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/"},"author":{"name":"wanderleyfcunha","@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"headline":"WhatsApp Bot in Go with the Official Cloud API: Sending and Webhooks from Scratch","datePublished":"2026-11-04T16:14:44+00:00","dateModified":"2026-11-04T16:14:48+00:00","mainEntityOfPage":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/"},"wordCount":1428,"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/","url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/","name":"WhatsApp API with Golang: Bot from Scratch | Vectalk","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/#website"},"datePublished":"2026-11-04T16:14:44+00:00","dateModified":"2026-11-04T16:14:48+00:00","author":{"@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"description":"WhatsApp API with Golang: build a bot from scratch with net\/http, webhook verification, HMAC signature, text and template sending, retries and Docker.","breadcrumb":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-golang-cloud-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vectalk.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"WhatsApp Bot in Go with the Official Cloud API: Sending and Webhooks from Scratch"}]},{"@type":"WebSite","@id":"https:\/\/vectalk.com.br\/blog\/#website","url":"https:\/\/vectalk.com.br\/blog\/","name":"Blog Vectalk","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vectalk.com.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b","name":"wanderleyfcunha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","caption":"wanderleyfcunha"},"sameAs":["https:\/\/vectalk.com.br\/blog"]}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/1351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/comments?post=1351"}],"version-history":[{"count":1,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/1351\/revisions"}],"predecessor-version":[{"id":1354,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/1351\/revisions\/1354"}],"wp:attachment":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/media?parent=1351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/categories?post=1351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/tags?post=1351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}