Skip to content

Latest commit

 

History

History
41 lines (24 loc) · 1.62 KB

verification_codes.md

File metadata and controls

41 lines (24 loc) · 1.62 KB

📜 Get verification codes and verify then

You can:

  • Get verification codes (by SMS or VOICE);
  • Verify the verification codes

You need to verify the phone number you want to use to send messages to your customers. Phone numbers must be verified through SMS/voice call. The verification process can be done through this library.

See the examples:

        WhatsappApiFactory factory = WhatsappApiFactory.newInstance(TOKEN);

        WhatsappBusinessManagementApi whatsappBusinessManagementApi = factory.newBusinessManagementApi();

        var response = whatsappBusinessManagementApi.requestCode(PHONE_NUMBER_ID, new RequestCode(CodeMethodType.SMS, LanguageType.EN_US));

        System.out.println(response);

        WhatsappApiFactory factory = WhatsappApiFactory.newInstance(TOKEN);

        WhatsappBusinessManagementApi whatsappBusinessManagementApi = factory.newBusinessManagementApi();

        var response2 = whatsappBusinessManagementApi.verifyCode(PHONE_NUMBER_ID, new VerifyCode("0000"));

        System.out.println(response2);

See full examples here

⤴️ back