> For the complete documentation index, see [llms.txt](https://en.help.firstline.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://en.help.firstline.cc/feature/channels/shi-yong-embedded-signup-zheng-he/legacy-integrations.md).

# Legacy integrations

{% hint style="warning" %}
**Existing integration methods on this page are not recommended for new users.** FIRST LINE has provided a simpler **embedded registration** integration flow, which does not require you to create a Meta developer app yourself, nor manually set up a Webhook or Verify Token.

If this is your first time connecting WhatsApp, we recommend using **the embedded registration integration guide**. This page is retained for reference for existing legacy setups and troubleshooting scenarios.
{% endhint %}

## Connect the WhatsApp channel

### Set up a Meta developer account

1\. Register or log in [Facebook Developer ](https://developers.facebook.com/)Register or log in to Facebook Developer, then click "Create App."

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FiruhShGw0GbZiliehZsv%2Fimage.png?alt=media&#x26;token=01ca53ec-fe0e-41fa-81ce-a2bb860a9b1b" alt=""><figcaption></figcaption></figure>

2. Choose "Business" as the application type.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FEP3J4b9t0hofUEdJIXO3%2Fimage.png?alt=media&#x26;token=9acd6fc2-9b45-4e8d-9aae-6f891be6c57d" alt=""><figcaption></figcaption></figure>

3. Enter the app name. If you don't have a business account, you can leave it unselected. After entering the name, click "Create App."*,*&#x41;fter entering the application name, if you don't have a business account, you can leave it unselected. After clicking "Create App," you will be redirected to the Meta dashboard.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2F2D8cIhE9gsgUnhTU4GkS%2Fimage.png?alt=media&#x26;token=702f2eb4-44e0-49f3-9fe7-f95347dd50e0" alt=""><figcaption></figcaption></figure>

4. Open the created app page, scroll down until you see "WhatsApp," then click "Set up."

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FXXENL3hoW4dif5Yzbulh%2Fimage.png?alt=media&#x26;token=36a15765-6890-401f-acf3-66972a230c64" alt=""><figcaption></figcaption></figure>

5. Press "Continue" to accept the Cloud API terms of use.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FeXREdDXPzh4dnhhOj7m7%2Fimage.png?alt=media&#x26;token=ba58c208-b96b-4703-a865-cc7ab969835b" alt=""><figcaption></figcaption></figure>

6. You can send and receive test messages by selecting "Start Now" to verify whether the app settings were successful.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FfsPxPgv4VEvRY1RlSS1A%2Fimage.png?alt=media&#x26;token=b24f4204-d5e6-4bc7-bdfb-93189e4edb0b" alt=""><figcaption></figcaption></figure>

### Connect phone number

1. Click "Add Phone Number" to link your phone number to your WhatsApp Business account.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FsNHqjlkoogbDwchjTFmy%2Fimage.png?alt=media&#x26;token=b8031c76-c136-4b62-910c-a609daa79b3d" alt=""><figcaption></figcaption></figure>

2. Fill in your business information, then click "Next."

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FA0nRg4TT04sVPZsYKjkt%2Fimage.png?alt=media&#x26;token=82ca240c-95e4-4d19-834a-c607731456f9" alt=""><figcaption></figcaption></figure>

3. Enter your phone number for verification. You can verify via SMS or call and receive a six-digit code.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2F2RzHol7iDy1Kf9lSawU4%2Fimage.png?alt=media&#x26;token=8bb16ee4-b0e3-408b-88f4-280faaaeb196" alt=""><figcaption></figcaption></figure>

4\. Check the send and receive messages area, where the phone number you added will be displayed. *Send and receive messages*, where the added phone number will be displayed.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FvnJqASitWAfyVHVgYSRP%2Fimage.png?alt=media&#x26;token=9d160a76-7325-4cba-8b78-490f91074fab" alt=""><figcaption></figcaption></figure>

You have connected your phone number to WhatsApp! Next, you need to connect it to FIRST LINE so you can send and receive messages from FIRST LINE.

### Connect WhatsApp to FIRST LINE <a href="#toc-mobile-11" id="toc-mobile-11"></a>

1. Click the "WhatsApp" page under Channels, then click the authorize button. This will open Facebook and prompt you to choose the WhatsApp Business account to authorize. Once successful, the list will show the authorized WhatsApp Business account(s).

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FBWcma9NLpD8moIRh0kAt%2FTweetPics%202023-01-31%20at%2004.29.16.png?alt=media&#x26;token=1e507e2c-f3a3-46d3-b366-374fdb0b370e" alt=""><figcaption></figcaption></figure>

2. Next, you will see in the list a WhatsApp account that has not yet been linked to a phone number. Click the edit button under Actions to open the individual WhatsApp page for configuration.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FRL4MI5CnuJmBrdQGfWe4%2Fimage.png?alt=media&#x26;token=9a598d8c-7e45-4238-a51a-61e47c20be81" alt=""><figcaption></figcaption></figure>

3. Select the phone number you want to connect, and the number must have been verified by Meta.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FXKmFYG68CliSCw0MVbHI%2Fimage.png?alt=media&#x26;token=8ae7ee68-245c-43ef-95f9-d8816e668af6" alt=""><figcaption></figcaption></figure>

### Add callback URL

1. Return to the WhatsApp section in the Facebook Developer app. Find the "Configuration" subsection and set the callback URL. Enter the generated callback URL and verification token into the corresponding fields in the webhook dialog, then confirm and save your changes.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FZaSy08x73rbWwE1tCJ0X%2Fimage.png?alt=media&#x26;token=88160536-cd85-42b7-ae81-8c8d3134e2eb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FIhP5eaDvj0tv2EpfV5Mp%2Fimage.png?alt=media&#x26;token=e961ee11-b7b1-4886-8f0e-7366a4d09c77" alt=""><figcaption></figcaption></figure>

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2FC7lgvksgKhN6snOIibVK%2Fimage.png?alt=media&#x26;token=72a8776f-92c0-4a03-b291-1bad7e9a1fbc" alt=""><figcaption></figcaption></figure>

### Subscribe to Webhook events

2. In the "Webhooks fields" section below, click "Edit" and choose "messages" from the menu, then subscribe to the message events.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2Fi6QQ6IXPFSlnWJbWDAco%2Fimage.png?alt=media&#x26;token=7a3d3a59-670d-4d61-8d72-510f8e69b848" alt=""><figcaption></figcaption></figure>

### Integration complete

🎉 Congratulations! You have completed the WhatsApp Cloud API integration setup, and you can now start serving customers.

## Troubleshooting

### How do I change my profile picture and display name?

After you authorize WhatsApp permissions to FIRST LINE, you can adjust and modify them through the list.

<figure><img src="https://842546780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNRu7dk70ei7JV9HlW9%2Fuploads%2Fw72DidDGcqxCRglh6rmX%2Fimage.png?alt=media&#x26;token=140a8e6a-87e7-405f-aca5-4b0c623d7974" alt=""><figcaption></figcaption></figure>

### How do I create a message template?

When you initiate a conversation, or contact a customer who hasn't talked to you in the past 24 hours, you must use a registered template message, and it must be approved by WhatsApp before it can be sent.

1. Go to [WhatsApp Business Manager](https://business.facebook.com/wa/manage/) management interface.
2. In the left panel, go to "Account Tools" > "Message Templates."
3. Click "Create Template" in the top right corner.
4. Once your submitted template is approved, it can be sent through FIRST LINE.

{% hint style="warning" %}
Once a message template is disabled, it can no longer be sent to customers until its quality rating improves or it no longer violates Meta's[Business](https://www.whatsapp.com/legal/business-policy/)or[Commerce](https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.whatsapp.com%2Flegal%2Fcommerce-policy%2F\&h=AT0KH9P4PIMybArrW5dqnZdebd70EcxgLWoZs5qERehOlk5tbOEh3g8Z-O_D-hquXBhUPp6rieX080_hIfuNtfpLAqiI4wE7RImwpCOEJyBp9vBmqATBr9M1zlEMUVhiMjgkwD-eZJw)policies.
{% endhint %}

### The customer did not receive the message after it was sent.

For customers who have never started a conversation with you, or who have not sent you a message in an existing thread within the past 24 hours, template messages are the only type of message that can be sent to them.

Other types of messages can only be sent after the customer contacts you.
