Creating WhatsApp Streams

This article will walk you through creating a WhatsApp SMS stream step by step.

The Streams API in the CommPeak SMS platform provides WhatsApp routes for interacting with the WhatsApp platform.

Creating WhatsApp streams is a Beta feature that is not available to all users by default. If you are interested in trying it, you first need to request access.

Requesting WhatsApp Business Streams Access

To submit your WhatsApp Business Streams access request:

  1. Log in to TextPeak in your browser.
  2. Select Streams API in the main TextPeak menu on the left.
  3. Click Create Stream API on the page that opens.
Screenshot of the Create Stream API button

Create Stream API button

  1. For the WhatsApp Beta option, click Request Access.
Screenshot of the window with Choose stream type dialog

Choose stream type pop-up window with Request Access buttons

  1. A TextPeak support agent will review your request and follow up with you shortly.
Screenshot of the window with Request Received! notification

Request Received! notification

📘

NOTE

If you retry accessing the Beta feature you already requested access to before your request gets approved, you will see the following pop-up window:

Request Already Sent pop-up window

Request Already Sent pop-up window

Getting Started with WhatsApp Streams

Once authorized to access the feature, you can start creating and managing WhatsApp SMS streams.

  1. To start, select Streams API in the main menu on the left and click Create Stream API on the page that opens.
  2. In the pop-up window, click to unfold the WhatsApp option and select it.
Screenshot of the stream type options: WhatsApp

Stream type pop-up window with access granted: WhatsApp

  1. The Create New Stream wizard will load. Fill in the necessary information to complete each step.

Create New Stream Wizard

Step 1: Stream API Details

Start with entering stream details.

  • Stream API name - enter a meaningful name to locate the stream quickly.

  • Stream API description - provide more information that will be visible when you open the stream.

  • Enable IP ACL - optionally, select the checkbox to limit access to the stream. Then, in the Add IP field, add one or more IP addresses from which you will make API calls. To add an IP, enter it and click Add.

  • Tags - create tags and apply them immediately to categorize your streams and quickly find the ones you need (optional). To add a tag, enter it in the field and then select from the drop-down.

    Screenshot of the Create New Stream page

    Create New Stream page

Click Save & Next to proceed to the next step.

📘

NOTE

You can save the stream as a draft on each step and then complete the rest at any time later.

Step 2: WhatsApp Settings

Provide your WhatsApp Business ID and permanent authentication token. Refer to this article to learn how to generate the token and where to get the ID.

Screenshot of the **WhatsApp settings** section

WhatsApp settings section

Click Save & Next to proceed to the next step.

Step 3: Incoming Messages Webhook (optional)

Create a Webhook right away to receive incoming messages through the API.

  • URL - select the GET or POST method and enter the URL to which you want to send data.
  • HTTP Headers - optionally, provide the key name and value.

The requests' preview is available on the right. You can copy the request body while creating the webhook or reviewing the stream summary.

Screenshot of the **Incoming Message Webhook** section

Incoming Message Webhook section

You can go ahead and skip this step for now. Otherwise, click Save & Next to proceed to the next step.

Step 4: Stream Summary

You can review the stream details here.

You can find your existing Senders and templates created in WhatsApp Business in WhatsApp Settings. TextPeak will use them to send messages through this stream API.

Screenshot of the **WhatsApp settings** section

Reviewing WhatsApp settings section

The API requests preview is available on the right. You can copy the endpoint or request body immediately.

  • The initial conversation request is for the first message.

    Screenshot of the **Initial conversation request** section

    Initial conversation request section

  • The message with a media request ​is for conversations with images, videos, files, and other elements.

    Screenshot of the **Message with media request** section

    Message with media request section

  • The reply message request is for sending text messages in a reply. ​

    Screenshot of the **Reply message request** section

    Reply message request section

The webhook request will be displayed if a webhook was created in Step 3.​

Screenshot of the **Webhook request** section

Webhook request section

After you click Create Stream, a pop-up window appears. You can copy your authorization token here.​

Screenshot of the **Stream IP was created successfully** success window

Stream IP was created successfully success window

Finally, click Done. The new stream will appear at the top of your Streams API table.