Send Messages via What’s App API

Ever received a spoof What’s App message, or invite to a What’s App Group?

It is because there is a What’s App API that allows anybody to automate the process of sending messages to an individual or group.

How to send message via What’s App API

Requirements

    • Have a WhatsApp number already linked to the platform and online.
    • Group WhatsApp ID (WID) that you can find in two ways:

How to obtain the Group WhatsApp ID

You can obtain the Group WhatsApp ID by using one of these methods:

    1. Web: go to number’s settings > Groups > Copy the Group WID.
    2. API: query the available groups in your number using this endpoint.

API endpoint

We will use the following API endpoint to send messages to a group:

Prepare the request

Target API URL using the POST method

https://api.wassenger.com/v1/messages

Required HTTPS headers > Obtain your API key here

Content-Type: application/json
Token: $API_TOKEN

Use body in JSON format

{
  "group": "$GROUP_WID@g.us",
  "message": "This is a sample message sent to a group"
}

Using LetsEncrypt Certificates

Importance of Open Source projects.

Web Hosting SSL Certificates can sometimes cost as much, or more than the monthly hosting cost. An open-source equivalent is Lets Encrypt. Lets Encrypt is a Non-Profit Organisation helping non-corporate individuals to make sure that their website/ mail-server meets SSL requirements.

SSL Certificates come in different levels of security – and the basic one is that the Certificate is tied to the DNS record that it states it is from, and is not on a black-list. Lets Encrypt increased levels of SSL Certificates, which require various documents to be submitted, reviewed and approved – each taking a longer time to get a SSL Certificate created.

For the ThinkingHat website, we have currently stuck to the basic one.

When new domains get created, it allows for the existing certificates to be expanded.

Installing and Using Certbot

Installing Certbot on most Linux distributions is straightforward. On Debian and Ubuntu, we can install it using apt-get:

$ sudo apt-get install certbot

Once installed, Certbot can be invoked from the command line to obtain and install certificates. For instance, we can request a certificate for a specific domain:

$ sudo certbot certonly --manual --preferred-challenges=dns -d example.com

This command utilizes the DNS-01 challenge mechanism interactively to validate domain ownership and issue the certificate.

Issuing a Certificate for a Domain with Multiple Subdomains

In scenarios where we need to secure multiple domains or subdomains with a single certificate, Certbot simplifies the process. For example, we can specify all the domains we want to include in the certificate request:

$ sudo certbot certonly --manual --preferred-challenges=dns -d example.com -d www.example.com -d blog.example.com

This command generates a single certificate covering all specified domains. The certificate can be installed on multiple servers if our subdomains are hosted elsewhere. The maximum number of subject alternative names allowed per certificate is 100 as of the time of writing of this article.

Expanding an Already-Issued Certificate

Sometimes, we may need to add more domains to an already-issued certificate. Certbot’s –expand option comes in handy for this purpose. After issuing the domains’ certificate, we can expand it to include additional subdomains:

$ sudo certbot certonly --expand --manual --preferred-challenges=dns -d example.com -d www.example.com -d blog.example.com -d store.example.com

This command issues a new certificate that replaces the existing one, now including the newly added domain along with the previously covered domains.

Issuing a Certificate for a Wildcard Domain

Another scenario we may encounter is when we need to secure multiple subdomains with a single certificate without prior knowledge of the subdomain names. In this case, we can opt for a wildcard certificate. Wildcard certificates require using the DNS-01 challenge:

$ sudo certbot certonly --manual --preferred-challenges=dns -d example.com -d *.example.com

This command generates a certificate covering the base domain, example.com, in addition to any number of direct subdomains, such as blog.example.com, web.example.com, etc.

Gurdwara Website Project

Project Information

CategoryInformationNotes
WebsiteGurdwara Sahib Woolwich Website
Legacy WebsiteLegacy WebsiteLast updated around 2022
Legacy WebsiteBackup of Legacy SiteMenu bar broken

Site Map

ParentPage NameContentsNotesOwner
AboutProvides the history of the Gurdwara, local community and area??
CommitteeProvides the list of current committee members and their titles and responsiblitiesGM
EducationSchoolProvides information regarding the Guru Nanak Khalsa School – timings, location and educational contentMB
VisitorProvides information regarding school visitsOld website provides this??
LinksProvides a list of various website/ information regarding SikhismOld website has a load of links – and can be usedSB
EventsProvides a calendar for the next 12 months – read onlyNeed to transcribe the physical diary into ExcelGM/ MB/ SB
GalleryProvides images regarding the GurdwaraInitial extracted from th e old website – photos from 2006+??
Contact UsProvides the ability to send an email; email/ phone/ social-media-links; Google Map InformationSB

Action Items

Site Map

#CategoryTitleDescriptionProgressWhoOpenedClosedPriorityStatus
1Old WebsiteBackup Old WebsiteBackup up the old website, and make available via a link on the new website: https://gurdwarasahibwoolwich.org.uk/legacy-site/Backed up and migrated – but Menu Bar broken on online version.SB2025-01-21 Tue2025-01-26 SunHighClosed
2Old WebsiteTransfer DomainPrevious owner to log into Weebly, and start the tranfer of the Domain to SBJS2025-01-21 Tue2025-02-16 SunLowOpen
3EmailMail Client SetupMigrate over old email, and allow for access via iPhonesiPhone picks up eamils, receivss emails – but has problems sending emailsSB2025-01-21 Tue2025-01-26 SunMedIn Progress
4SecurityHide Login PageLogin Page to be hidden, to ensure that the website is not hackedChanged to non-standard nameSB2025-01-21 Tue2025-01-26 SunHighClosed
5BrandingWebsite LogoNeed a Logo for the website, emails and all correspondenceTemporary one created by SBNJ2025-01-21 Tue2025-02-16 SunMedOpen
6BrandingFavion.icoTab Icon to similar to the Website Logo – limited to 16 x 16 px in sizeTemporary one created by SBNJ2025-01-21 Tue2025-02-16 SunMedOpen
7BrandingHome Page ImageImage to be placed on all places – limited to 1200 x 280 px in sizeTemporary one created by SBNJ2025-01-21 Tue2025-02-16 SunMedOpen
8LinksSocial Media to be AddedAdd links to Facebook, YouTube, What’s App Link, InstagramAll AddedSB2025-01-21 Tue2025-02-16 SunMedClosed
9LinksInstragram AccountInstagram is popular, and we don’t have oneAlready created – and added to website. Who owns it? instagram.com/gurdwara_sahib_woolwich/NB2025-01-21 Tue2025-02-16 SunLowOpen
10EventsCreate Event CalendarCreate a prototype Events Calendar – to see what is missing and needs to be addedInitial version created. Awaiting FeedbackSB2025-01-21 Tue2025-02-16 SunMedClosed
11RepositoryCreate Project RepositoryProject File repository for all documents related to the project, and allow for people to participateOne-Drive created – pending sharingSB2025-01-21 Tue2025-01-26 SunHighClosed
12DonationsDonation FunctionalityInvestigate adding WorldPay/ Paypal to websiteDS2025-01-21 Tue2025-02-16 SunLowOpen
13EmailDaily EmailCollate Daily Hukamnamas for the Year – or how we can source them each week. And put on Home page, and email out to subscribers.DS2025-01-21 Tue2025-02-16 SunLowOpen
14EmailNews Letter SubscriptionAllow sangat to register their email address for CommunicationsInitial newsletter will be the Daily HukamnamaSB2025-01-21 Tue2025-02-16 SunLowOpen
15InvolvementLogo PollAllow 3+ Logos to be available – and for people to provide their own for a decisionSB2025-01-21 Tue2025-02-16 SunLowOpen
16ImagesGurdwara PhotosNeed photos of different parts of the Gurdwara for use in the Website2025-01-21 Tue2025-02-16 SunLowOpen
17SEOGoogle ListingGoogle still has the old website shown – how to get it changed?Request submitted Sat 25-JanSB2025-01-25 Sat2025-02-16 SunLowIn Progress
18SEOBing ListingBing still has the old website shown – how to get it changed?Request submitted Sat 25-JanSB2025-01-25 Sat2025-02-16 SunLowIn Progress

Privacy Policy

Who we are

Suggested text: Our website address is: https://thinkinghat.co.uk.

Comments

Suggested text: When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.

An anonymised string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service Privacy Policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

Suggested text: If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

Suggested text: If you leave a comment on our site you may opt in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.

If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.

When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select “Remember Me”, your login will persist for two weeks. If you log out of your account, the login cookies will be removed.

If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Suggested text: Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.

These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

Suggested text: If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

Suggested text: If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognise and approve any follow-up comments automatically instead of holding them in a moderation queue.

For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

Suggested text: If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Suggested text: Visitor comments may be checked through an automated spam detection service.