Liking cljdoc? Tell your friends :D

tekservix.waservix

WAservix WhatsApp API Gateway: Clojure client by Tekservix.

Send WhatsApp messages from your own number. A thin wrapper over the official Java client (com.tekservix/waservix on Maven Central); every call returns plain Clojure data (maps with keyword keys, vectors).

You need a Tekservix account with WAservix and your number's device API key (it starts with wpk_): https://tekservix.com/waservix

WAservix WhatsApp API Gateway: Clojure client by Tekservix.

Send WhatsApp messages from your own number. A thin wrapper over the official
Java client (com.tekservix/waservix on Maven Central); every call returns plain
Clojure data (maps with keyword keys, vectors).

You need a Tekservix account with WAservix and your number's device API key
(it starts with wpk_): https://tekservix.com/waservix
raw docstring

clientclj

(client api-key)
(client api-key
        {:keys [base-url timeout-ms]
         :or {base-url WAservix/DEFAULT_BASE_URL timeout-ms 30000}})

Creates a client. Options: :base-url, :timeout-ms (default 30000).

(def wa (client (System/getenv "WASERVIX_API_KEY")))

Creates a client. Options: :base-url, :timeout-ms (default 30000).

(def wa (client (System/getenv "WASERVIX_API_KEY")))
sourceraw docstring

delete-messageclj

(delete-message c msg-id)

Deletes a message for everyone.

Deletes a message for everyone.
sourceraw docstring

edit-messageclj

(edit-message c msg-id text)

Edits a sent text (WhatsApp allows about 15 minutes).

Edits a sent text (WhatsApp allows about 15 minutes).
sourceraw docstring

get-contactclj

(get-contact c phone)

One contact.

One contact.
sourceraw docstring

group-metadataclj

(group-metadata c group-id)

One group's details; group-id ends in @g.us.

One group's details; group-id ends in @g.us.
sourceraw docstring

json->cljclj

(json->clj e)

Turns a Gson JsonElement into Clojure data.

Turns a Gson JsonElement into Clojure data.
sourceraw docstring

list-contactsclj

(list-contacts c)

Contacts of your number.

Contacts of your number.
sourceraw docstring

list-groupsclj

(list-groups c)

Groups your number is in.

Groups your number is in.
sourceraw docstring

message-infoclj

(message-info c msg-id)

Status of a sent message: queued, sent, delivered, read, played or failed.

Status of a sent message: queued, sent, delivered, read, played or failed.
sourceraw docstring

on-whatsapp?clj

(on-whatsapp? c phone)

Does this number have WhatsApp? Returns the API answer, e.g. {:exists true …}.

Does this number have WhatsApp? Returns the API answer, e.g. {:exists true …}.
sourceraw docstring

requestclj

(request c method path & [body])

Any other API call: (request wa :get "/user").

Any other API call: (request wa :get "/user").
sourceraw docstring

resend-messageclj

(resend-message c msg-id)

Sends a failed message again.

Sends a failed message again.
sourceraw docstring

save-contactclj

(save-contact c phone contact-name)

Saves a contact name.

Saves a contact name.
sourceraw docstring

send-documentclj

(send-document c to document-url & [file-name caption])

Document from a public URL, with an optional file name and caption.

Document from a public URL, with an optional file name and caption.
sourceraw docstring

send-imageclj

(send-image c to image-url & [caption])

Image from a public URL, with an optional caption.

Image from a public URL, with an optional caption.
sourceraw docstring

send-messageclj

(send-message c to fields)

Sends any message type to a number or a group ID (…@g.us). Field names follow the API: :text :imageUrl :videoUrl :audioUrl :documentUrl :fileName :location :poll :replyTo :mentions …

(send-message wa "+250788123456" {:location {:latitude -1.9441 :longitude 30.0619 :name "Our shop"}})

Sends any message type to a number or a group ID (…@g.us). Field names follow the API:
:text :imageUrl :videoUrl :audioUrl :documentUrl :fileName :location :poll :replyTo :mentions …

(send-message wa "+250788123456" {:location {:latitude -1.9441 :longitude 30.0619 :name "Our shop"}})
sourceraw docstring

send-textclj

(send-text c to text)

(send-text wa "+250788123456" "Your order has shipped")

(send-text wa "+250788123456" "Your order has shipped")
sourceraw docstring

statusclj

(status c)

Connection status of your number.

Connection status of your number.
sourceraw docstring

verify-webhookclj

(verify-webhook signature secret)

Checks the X-Webhook-Signature header of a webhook call against your number's webhook secret.

Checks the X-Webhook-Signature header of a webhook call against your number's webhook secret.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close