WhatsApp API Integration – Bad request – please check your parameters

Hi all,

I’m running into a consistent issue with the WhatsApp Trigger node in n8n. Every time I try to execute the workflow, I get this error:

Hi there, welcome to the community, can you give more screenshot of the workflow, of the whatsapp trigger and the error itself

but looking from the error saying Bad Request and invalid parameters, that means there are something wrong on your side on how you configured this whatsapp trigger node

if you can give me more screenshot i can definitely help pin point the error

Hey! Thank you for your response.

I’m sharing the screenshots of the error and the workflow below. I’m currently hosting this on Node, if that helps. I’m fairly confident that I’ve set everything up correctly, as I’ve followed multiple tutorials—most of which show the same steps.

Here’s one of the video references I used:




on the recipient phone number, try without the +, so just 919…

I did try it, but it still shows the same problem: “Bad request – please check your parameters.”
WhatsApp Trigger 1: Invalid parameter.
The WhatsApp trigger is set to “On Message.”

and just to make sure, if your facebook/meta app is still on testing, you need to add this recipient phone number as a test users in your app

have you also done that?

When I tried to add test users in the app, it showed a message (as seen in the screenshot).
What I did was go to Roles and add the user from there (as shown in the screenshot).
However, it still didn’t work — in the recipient number field, I used the phone number that is linked to the test user’s Facebook account.
But it still says “Bad parameter” for some reason.


)


)

I am Facing this issue, followed the same video, Any resolution to it?

The webhook url is localhostits not exposed to the web you will have to create a tunnel and expose it

1 Like

I’m having the same problem as OP, I’m also trying to do this locally with the community edition. I do get your point, but what’s no clear for me is if we need to change the Node’s Webhook URL parameters or do we have to add a Webhook that connects to the WhatsApp/Facebook API before the Whatsapp node listening for incoming messages?

Yes, you need to enter your n8n webhook URL (the public URL where your n8n instance is accessible) in the Meta (Facebook/WhatsApp) Developer Platform when configuring the webhook for your WhatsApp app. This allows Meta to send webhook events (such as incoming messages) directly to your n8n workflow.

If you are running locally and exposing n8n via ngrok or a reverse proxy, always ensure the WEBHOOK_URL matches the public address, not localhost or a private IP, otherwise Meta/WhatsApp cannot reach your webhook.

Just make sure your n8n instance is configured to generate public webhook URLs by setting the WEBHOOK_URL environment variable, and use the WhatsApp Trigger node as designed.

1 Like

Thanks for the help, I was able to connect my local Whatsapp node to the Internet, in case someone is having the same issue this is what I did:

  1. Connect the local N8N Starter kit to the Internet:

    1. Select an option, you can use Ngrok or a Reverse Proxy with Caddy or a Reverse Proxy with Nginx or a CloudFare tunnel, I opted for Ngrok.
    2. Create an account in Ngrok
      1. Choose the Free tier plan
      2. Install it following the instructions, in my case is Linux
      3. Run the command to add your token to the default ngrok.yml configuration file:
        1. ngrok config add-authtoken [YOUR-NGROK-TOKEN]
        2. look for your dev domain, it will be in the “Deploy your app online” section, it will look something like this: https ://your-public-domain.dev and save it for later
    3. Go to your Meta Business Suite → Select your current App → “Open in AppDashboard”
      1. Scroll to the bottom to “My Products” section
      2. Click on Webhooks
      3. Fill the required information for:
        1. Callback URL = YOUR-NGROK-DEV-DOMAIN (https ://your-public-domain.dev)
        2. Verify token = Your verification app token (is inside the Meta AppDashboard)
        3. DO NOT CLICK VERIFY YET! You need your local N8N workflow to be running and ngrok too, but before that you need to modify you docker file:
    4. Modify docker-compose.yml file:
      1. Add your ngrok dev domain to a variable named WEBHOOK_URL and N8N_HOST, my docker-compose.yml looks like this:
        1. x-n8n: &service-n8n
          image: localhost/n8n-ffmpeg
          build:
          context: .
          dockerfile: Dockerfile.ffmpeg
          networks: [‘demo’]
          environment:
          - DB_TYPE=postgresdb
          - DB_POSTGRESDB_HOST=postgres
          - DB_POSTGRESDB_USER=${POSTGRES_USER}
          - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
          - N8N_DIAGNOSTICS_ENABLED=false
          - N8N_PERSONALIZATION_ENABLED=false
          - N8N_ENCRYPTION_KEY
          - N8N_USER_MANAGEMENT_JWT_SECRET
          - OLLAMA_HOST=${OLLAMA_HOST:-ollama:11435}
          - WEBHOOK_URL=https ://your-public-domain.dev
          - N8N_HOST= your-public-domain.dev
          env_file:
          - path: .env
          required: true
        2. Save it
    5. Start ngrok in your host machine by running the following command (this applies to me because I’m using linux)
      1. ngrok http 5678 (this port number must match the one in your docker-compose.yml file, see below)
        1. n8n:
          <<: *service-n8n
          hostname: n8n
          container_name: n8n
          restart: unless-stopped
          **ports:
          • 5678:5678**
            volumes:
          • n8n_storage:/home/node/.n8n
          • ./n8n/demo-data:/demo-data
          • ./shared:/data/shared:Z
            depends_on:
            postgres:
            condition: service_healthy
            n8n-import:
            condition: service_completed_successfully
    6. Start your N8N Starter Kit and log in
    7. Start your Whatsapp workflow
    8. Go back to your Meta AppDashboard → “Verify and Safe” button (Step 3 in this post)

    You’ll see that after all this when you start the Workflow again the error will not appear and that the WhatsApp node properties will now have the webhooks properties changed to your ngrok dev domain and not local host anymore, also the connection to your Whatsapp App will be successful

Most of the video run it on n8n cloud but I faced this issue when trying to run it locally

  1. you need to have ngrok as a proxy to your local host. (reason being you need a valid https for meta to send you the data)
  • command: ngrok http 5678
  1. run this docker comment with your ngrok

    docker volume create n8n_data

docker run -it --rm
–name n8n
-p 5678:5678
-e GENERIC_TIMEZONE=“<YOUR_TIMEZONE>”
-e TZ=“<YOUR_TIMEZONE>”
-e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
-e N8N_RUNNERS_ENABLED=true
-e WEBHOOK_URL={{insert your link here}}
-v n8n_data:/home/node/.n8n

i hope this help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.