Posts tagged with api

I need to send a Calendar file (ICS) from the REST Api but i can`t.

Nevertheless, I could send a jpg file. In this article Twilio staff announced that users can send images and videos, but also PDFs, text files, and audio files using the Twilio API for WhatsApp.

This is my call with JPG file that attach the media in a whatsapp message OK:

curl -X POST \ https://api.twilio.com/2010-04-01/Accounts/ACYYYYYYYYYYYYYYYYY/Messages.json \ -H 'authorization: Basic  XXXXXXXXXXXXX' \ -H 'cache-control: no-cache' \ -H 'content-type: application/x-www-form-urlencoded' \ -H 'postman-token: 58fa6aca-3b92-66d4-f675-9906bed37302' \ -d 'To=whatsapp%3A%2BXXXXXXXX&From=whatsapp%3A%2BYYYYYYY&Body=Hola%20probando2&MediaUrl=https%3A%2F%2Flh4.googleusercontent.com%2F-nbafRpNzZAc%2FWjHLp8y3NOI%2FAAAAAAAAAAA%2Fc8CSoPlcgcAazvZFKSU3uYxwo3HZ7FVewCOQCEAE%2Fs128-c-k%2Fphoto.jpg%0A' 

When i substitute MediaUrl path with a txt file path or ics file, the message wasn't attach the file:

for example something like this:

curl -X POST \ https://api.twilio.com/2010-04-01/Accounts/ACYYYYYYYYYYYYYYYYY/Messages.json \ -H 'authorization: Basic  XXXXXXXXXXXXX' \ -H 'cache-control: no-cache' \ -H 'content-type: application/x-www-form-urlencoded' \ -H 'postman-token: 58fa6aca-3b92-66d4-f675-9906bed37302' \ -d 'To=whatsapp%3A%2BXXXXXXXX&From=whatsapp%3A%2BYYYYYYY&Body=Hola%20probando2&MediaUrl=https:%2F%2Faaa.bbb.com%2Fccc%2Fcalendar.ics%0A' 

i want to integrate Whatsapp Business API from facebook business manager.

As per the steps to create WhatsApp account, given in blog (https://www.facebook.com/business/help/2087193751603668?id=2129163877102343)

Steps done by me :

  • First i was created Facebook Business Manager account.
  • Then i was completed business verification in Business Manager.
  • As per above blog , after business verification "Whatsapp Account" option will enabled for me.like this image. (Whatsapp accounts option is enable (option show))
  • Here my business verification verified successfully.but after successfully verification i cant able to show "Whatsapp Accounts" option.like this image (Whatsapp accounts option is not show)

However, I don't see link of "WhatsApp Accounts" in "Accounts" section though my business is verified here. I don't how to proceed ahead without "WhatsApp Accounts" link.

Please guide us for further steps for creating "WhatsApp Accounts" and get the certificate.

Following to this documentation https://developers.facebook.com/docs/whatsapp/business-management-api/phone-numbers about whatsapp business accounts, it is possible to have multiple phone numbers in one account. Does someone know how you can define from which number a message is send, when sending a message to a client? There is nothing in the api about sending messages.

following to the documentation you can read the phone numbers and their whatsapp id via

curl -X GET \ 'https://graph.facebook.com/v3.3/your-whatsapp-business-account-id/phone_numbers' \   -d 'access_token=your-access-token' 

example result

{   "data": [     {       "verified_name": "Jasper's Market",       "display_phone_number": "+1 631-555-5555",       "id": "1906385232743451",       "quality_rating": "GREEN"     },     {       "verified_name": "Jasper's Ice Cream",       "display_phone_number": "+1 631-555-5556",       "id": "1913623884432103",       "quality_rating": "NA"     }   ], } 

I would expect something like a senderId field when sending a message.