WhatsApp / WhatsApp-Business-API-Setup-Scripts

The scripts related to setting up WhatsApp business API
MIT License
404 stars 425 forks source link

I am not able to add any phone number in Whatsapp Manager. #59

Closed suisun2015 closed 3 years ago

suisun2015 commented 3 years ago

Hi, I have a business account and also can open the "Whatsapp Manager" page. But the challenge is I can't add any phone number in Whatsapp Manager. Here goes the error message.

"The certificate is not available for your business. Only the business solution provider who manages integration with the WhatsApp business platform will be able to download the certificate."

I hit google to find any solutions for this, but there is none, even I am not sure how to make my account as business solution provider. So please let me know how I can add phone numbers and use the Whatsapp business API. Many thanks!

Adding my account details in snapshot as attachment.

image image

alanhhwong commented 3 years ago

Hi there,

You should have been working with a Business Solutions Provider to get access to this WhatsApp Business Account? They are the ones who will register the account for you (by downloading the certificate).

Can you share with me account details? You can email me at alanwong@fb.com

suisun2015 commented 3 years ago

Thanks for your kind reply. But the thing is... we just want to becoming a solution provider. Is there any solution to this?

alanhhwong commented 3 years ago

You can apply here: https://www.facebook.com/business/m/whatsapp/business-api

abhiram1673 commented 2 years ago

i have also facing the same issue can you you help me out

bhargavweb commented 2 years ago

i have also facing the same issue can you you help me out

Hi @abhiram1673, we are also facing the same issue. Were you able to troubleshoot this?

manfye commented 2 years ago

why facebook want to make thing so complicated?

bhargavweb commented 2 years ago

@manfye With the recent implementation of the cloud API and you want to call the APIs directly from your application, the certificate is not required anymore. The certificate is required only if you are integrating with third-party service providers like twilio. Learned this the hard way.

This guy has made a good video of how to setup WhatsApp business Cloud API. Hope it is of some help to anyone coming here. https://www.youtube.com/watch?v=d6lNxP2gadA

manfye commented 2 years ago

@bhargavweb thank you, I will go to explore it further

Nirbhay468 commented 2 years ago

Why I am not able to generate a certificate for verification. image

hacker-prime commented 1 year ago

You can apply here: https://www.facebook.com/business/m/whatsapp/business-api

I've applied to this and I haven't received an email from them. Why is this so complicated?

hacker-prime commented 1 year ago

Hi, I have a business account and also can open the "Whatsapp Manager" page. But the challenge is I can't add any phone number in Whatsapp Manager. Here goes the error message.

"The certificate is not available for your business. Only the business solution provider who manages integration with the WhatsApp business platform will be able to download the certificate."

I hit google to find any solutions for this, but there is none, even I am not sure how to make my account as business solution provider. So please let me know how I can add phone numbers and use the Whatsapp business API. Many thanks!

Adding my account details in snapshot as attachment.

image image

I am experiencing the same thing and for the life of me I don't know what to do.

aslamanver commented 1 year ago

Have you fixed ?

hostops commented 1 year ago

This is how I overcame this problem. If you have any issues, command will print them.

curl -i -X POST https://graph.facebook.com/v16.0/{phone number id}/register -H 'Authorization: Bearer {your token}' -H 'Content-Type: application/json' -d '{ "pin": "{you make up 6 digit pin}", "messaging_product": "whatsapp"}'

Maybe this link will be useful if you are building simple whatsapp integration: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started-for-bsps#subscribe-waba

aviderambo commented 1 year ago

This is how I overcame this problem. If you have any issues, command will print them.

curl -i -X POST https://graph.facebook.com/v16.0/{phone number id}/register -H 'Authorization: Bearer {your token}' -H 'Content-Type: application/json' -d '{ "pin": "{you make up 6 digit pin}", "messaging_product": "whatsapp"}'

Maybe this link will be useful if you are building simple whatsapp integration: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started-for-bsps#subscribe-waba

Thanks man. If anyone wondering where to find the phone number id, it's in one of facebook request payloads in the "Getting started" section.

tyoc213 commented 11 months ago

If the business account had been working with a BSP, but now migrated to cloud API so there is no more intermediary why the business cant get the base64 certificate directly and expects this to be done by a BSP?

(also pinged @alanhhwong by mail)

cbw-lsalita commented 9 months ago

same issue, Meta is blocking the certificate code, already signed up with WA Business Platform... still no response....

thelinuxkid commented 8 months ago

This is how I overcame this problem. If you have any issues, command will print them.

curl -i -X POST https://graph.facebook.com/v16.0/{phone number id}/register -H 'Authorization: Bearer {your token}' -H 'Content-Type: application/json' -d '{ "pin": "{you make up 6 digit pin}", "messaging_product": "whatsapp"}'

Maybe this link will be useful if you are building simple whatsapp integration: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started-for-bsps#subscribe-waba

This worked. Thanks!! If you turn off 2FA then follow this to turn it on again, the display name on the phone number will be changed to whatever you attempted to change it to without having to download any certificates.

RyzorBent commented 7 months ago

This is how I overcame this problem. If you have any issues, command will print them.

curl -i -X POST https://graph.facebook.com/v16.0/{phone number id}/register -H 'Authorization: Bearer {your token}' -H 'Content-Type: application/json' -d '{ "pin": "{you make up 6 digit pin}", "messaging_product": "whatsapp"}'

Maybe this link will be useful if you are building simple whatsapp integration: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started-for-bsps#subscribe-waba

This worked. Thanks!! If you turn off 2FA then follow this to turn it on again, the display name on the phone number will be changed to whatever you attempted to change it to without having to download any certificates.

This was very helpful, disabling the 2FA did the trick!!

ataknakbulut commented 5 months ago

This is how I overcame this problem. If you have any issues, command will print them.

curl -i -X POST https://graph.facebook.com/v16.0/{phone number id}/register -H 'Authorization: Bearer {your token}' -H 'Content-Type: application/json' -d '{ "pin": "{you make up 6 digit pin}", "messaging_product": "whatsapp"}'

Maybe this link will be useful if you are building simple whatsapp integration: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started-for-bsps#subscribe-waba

I tried this one but only returns

{ "success": true }

Is api changed or i made some mistake?

thelinuxkid commented 5 months ago

@ataknakbulut That means it worked.

ataknakbulut commented 5 months ago

@ataknakbulut That means it worked.

But still i can't download certificate.

thelinuxkid commented 5 months ago

@ataknakbulut the process will allow to change the name, not download the certificate.

Git-Sagar-J commented 3 months ago

@ataknakbulut the process will allow to change the name, not download the certificate.

This is how I overcame this problem. If you have any issues, command will print them.

curl -i -X POST https://graph.facebook.com/v16.0/{phone number id}/register -H 'Authorization: Bearer {your token}' -H 'Content-Type: application/json' -d '{ "pin": "{you make up 6 digit pin}", "messaging_product": "whatsapp"}'

Maybe this link will be useful if you are building simple whatsapp integration: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started-for-bsps#subscribe-waba

This worked. Thanks!! If you turn off 2FA then follow this to turn it on again, the display name on the phone number will be changed to whatever you attempted to change it to without having to download any certificates.

i did the same but display name didn't change

alilibx commented 3 months ago

Hi All,

Call This api https://graph.facebook.com/v19.0/{{WABA-ID}}/phone_numbers?fields=display_phone_number,name_status,certificate,new_certificate,new_name_status

See below link for more infor https://developers.facebook.com/docs/whatsapp/embedded-signup/faq/#faq_842061566349538

Lucisano commented 2 months ago

FULL SOLUTION - Correct as of 09/05/2024

I have managed to verify my number and also move it from Pending to Connected without having to download the cert

Pre-req: First add your number to your WhatsApp Business account via the UI here https://business.facebook.com/wa/manage/home/

1: Get your Phone Number ID

Please ENSURE you're using the correct WABA-ID (the one your phone number is registered on, not your test account ID)

https://github.com/WhatsApp/WhatsApp-Business-API-Setup-Scripts/issues/59#issuecomment-2053569060

https://graph.facebook.com/v19.0/{{WABA-ID}}/phone_numbers

  1. Request Verification Code

POST 'https://graph.facebook.com/v19.0/{{PHONE-NUMBER-ID}/request_code?ode_method=VOICE&language=en' https://developers.facebook.com/docs/whatsapp/solution-providers/phone-numbers/registering-phone-numbers/

  1. Verify using the Code (received above)

POST https://graph.facebook.com/v19.0/{{PHONE-NUMBER-ID}}/verify_code?code={{VERIFY-CODE}} https://developers.facebook.com/docs/whatsapp/solution-providers/phone-numbers/registering-phone-numbers/

  1. FINALLY - Register the Phone number I know this sounds back to front, but this is the last step to set the number as Connected

POST https://graph.facebook.com/v19.0/{{PHONE-NUMBER-ID}}/register BODY { "pin": "{{make a 6 digit pin to go here}}", "messaging_product": "whatsapp"}

image

TheGlauberr commented 2 months ago

hi @Lucisano

where do you get the bearer token to hit the https://graph.facebook.com/v19.0/{{WABA-ID}}/phone_numbers ?

Lucisano commented 2 months ago

hi @Lucisano

where do you get the bearer token to hit the https://graph.facebook.com/v19.0/{{WABA-ID}}/phone_numbers ?

Hey @TheGlauberr

You're best follow these docs to get a Bearer token

https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login

You can get a Temp token via the Quickstart Section in your App page or a Permanent Token by creating a system token

wuler2024 commented 1 month ago

Hello guys,

I've followed the steps provided by you to set the phone number as Connected status, and it worked. Thank you very much.

After the phone number was set to connected status, I've tried to send out a message by using API (https://graph.facebook.com/v19.0/{phone number id}/messages), it worked as well.

But now I couldn't select the phone number(in Connected status) from the Setup API page, and "You have 0 production numbers and 1 test number" appeared on the Configuration page as well.

I would be grateful if you could tell me how to add the phone number to my app.

1 2