Skip to content

Commit

Permalink
Fix WhatsAppAgent docs (#578)
Browse files Browse the repository at this point in the history
* Fix WhatsAppAgent docs

* Refactor whatsapp api key setup into snippet
  • Loading branch information
sternakt authored Nov 14, 2024
1 parent 432f5a0 commit e7d4ba3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@
"filename": "docs/docs/en/tutorials/whatsapp/index.md",
"hashed_secret": "52e0d11a70cdb70d4c51064d08bd8f179ebb8bb4",
"is_verified": false,
"line_number": 75,
"line_number": 50,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "docs/docs/en/tutorials/whatsapp/index.md",
"hashed_secret": "bc39a40e023f4ffb425b82830f86a464e5ea1072",
"is_verified": false,
"line_number": 76,
"line_number": 51,
"is_secret": false
}
],
Expand Down Expand Up @@ -252,5 +252,5 @@
}
]
},
"generated_at": "2024-11-11T13:22:59Z"
"generated_at": "2024-11-13T14:43:44Z"
}
27 changes: 27 additions & 0 deletions docs/docs/en/snippets/creating_whatsapp_api_key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#### Create Infobip Account
**Step 1**: If you don’t have a Infobip account, you’ll need to sign up:

- Go to [Infobip Portal](https://www.infobip.com/signup){target="_blank"} and create account

**Step 2**: Settings

- In the **Customize your experience** section, choose:
1. **WhatsApp**
2. ***Customer support***
3. ***By using code (APIs, SDKs)***

**Step 3**: Test WhatsApp API

- After you have created the account, you will be redirected [Infobip Homepage](https://portal.infobip.com/homepage){target="_blank"}.
- Check the **Send your first message** option and send a WhatsApp message to yourself.
- In this tutorial, we will only be sending messages **to your own number**

!!! note "Important"
Upon receiving this message, please **reply** (e.g., with "Hi") to initiate the session. Note that sessions expire after 24 hours. If your session has expired, simply send another message to create a new one.

Copy the **API Key** from the top-right corner and continue with the next steps.

**Step 4**: Register your WhatsApp sender (Optional)

- By default, Infobip number will be used as the sender for your messages.
- If you wish to create a new sender phone number and customize your branding (including your name and logo), click on [Register Sender](https://portal.infobip.com/channels-and-numbers/channels/whatsapp/senders){target="_blank"}.
27 changes: 1 addition & 26 deletions docs/docs/en/tutorials/whatsapp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,8 @@ To create [Bing Web Search](https://www.microsoft.com/en-us/bing/apis/pricing){t
!!! note
You will need to create **Microsoft Azure** Account.

#### Create Infobip Account
**Step 1**: If you don’t have a Infobip account, you’ll need to sign up:

- Go to [Infobip Portal](https://www.infobip.com/signup){target="_blank"} and create account

**Step 2**: Settings

- In the **Customize your experience** section, choose:
1. **WhatsApp**
2. ***Customer support***
3. ***By using code (APIs, SDKs)***

**Step 3**: Test WhatsApp API

- After you have created the account, you will be redirected [Infobip Homepage](https://portal.infobip.com/homepage){target="_blank"}.
- Check the **Send your first message** option and send a WhatsApp message to yourself.
- In this tutorial, we will only be sending messages **to your own number**

!!! note "Important"
Upon receiving this message, please **reply** (e.g., with "Hi") to initiate the session. Note that sessions expire after 24 hours. If your session has expired, simply send another message to create a new one.

Copy the **API Key** from the top-right corner and continue with the next steps.

**Step 4**: Register your WhatsApp sender (Optional)

- By default, Infobip number will be used as the sender for your messages.
- If you wish to create a new sender phone number and customize your branding (including your name and logo), click on [Register Sender](https://portal.infobip.com/channels-and-numbers/channels/whatsapp/senders){target="_blank"}.
{! docs/en/snippets/creating_whatsapp_api_key.md !}

#### Set Up Your API Keys in the Environment

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/en/user-guide/runtimes/autogen/whatsapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This command installs FastAgency with support for the Console interface and [Aut

### Creating your WhatsApp API key

{! docs/en/tutorials/whatsapp/index.md[ln:49-76] !}
{! docs/en/snippets/creating_whatsapp_api_key.md !}

#### Set Up Your API Key in the Environment

Expand Down

0 comments on commit e7d4ba3

Please sign in to comment.