How to verify email in 1C?

Tatiana Prozorova

18.06.2020 7 min

The process of verifying an email address is called Email Verification. Verification improves the odds that email belongs to a real person. The primary purpose of email verification is to guarantee that a real person will receive all your sent emails.

How can we verify email in 1C? We can do it with different email verification web services. For example, let’s use service. The opportunity to try for free how it will work the main advantage of this service. The first 100 calls are free.

The first step is to register the You can do it the same way as always.

The next step is to receive your API key.

Once you have received the API key, you can open 1C and start writing code.

Let’s add the constant, where we will store the API key:

API key

Add the Common form on which this constant will be located:

API key form 

Please, add one Enumeration with four values: SaveToSend, Invalid, Risky, Unknown – they are will be as verification answers from the


 Then we add one Catalog “Clients” with two attributes “Email” (string) and “EmailVerifying” (Enums.EmailVerifying), the Item form for it.

 Catalog “Clients”


We rename the “Description” field to “Full Name”- to be clear for understanding that we will store here. Also, the “Email verifying” field we make as Unenabled, we don’t need the opportunity the users to change this field. Here is we will store the answer for our request.  

 Catalog Form Wizard


Catalog “Clients” Form

We add the new command VerifyEmail, “Create on a client” action and via drag-and-drop, we make a “Verify email” button.

“Verify email” button

Well - now let’s move on to the 1C source code.

At first, we create VerifyEmail() procedure. Here is we make a request to, receive the verifying answer, and put it into the “Email verifying” field.


Procedure VerifyEmail(Command)

            // Insert handler content.

            Token = getApiKey();

            If Not ValueIsFilled(Token) Then

                        Message("Please, fill the Constant: Debounce Api Key");




            sEmail = Object.Email;

            if (sEmail <> "") then

                        Host     = "";

                        HTTPRequest = New HTTPRequest;

                        HTTPRequest.ResourceAddress = "v1/?api=" + Token + "&email=" + sEmail+"&photo=true";

                        HTTPConnection         = New HTTPConnection(host,,,,,10,New OpenSSLSecureConnection);

                        HTTPAnswer               = HTTPConnection.Get(HTTPRequest);

                        stringAnswer= HTTPAnswer.GetBodyAsString();

                        JSONReader = New JSONReader;


                        JsonResult = ReadJson(JSONReader,True);      


                        For each strResult in JsonResult Do

                                   If (strResult.Key = "debounce") Then

                                               For each strDebounce in  strResult.Value Do

                                                           If (strDebounce.Key = "result") Then

                                                                                   Object.EmailVerifying = SetupEmailVerifying(strDebounce.Value);                                                     






                        Message("Please, fill the Email field");





Function SetupEmailVerifying(EmailVerifyingValue)


            If (EmailVerifyingValue = "Safe to Send") Then

                        Object.EmailVerifying = Enums.EmailVerifying.SafeToSend;

            ElsIf (EmailVerifyingValue = "Invalid") Then

                        Object.EmailVerifying = Enums.EmailVerifying.Invalid;

            ElsIf (EmailVerifyingValue = "Risky") Then

                        Object.EmailVerifying = Enums.EmailVerifying.Risky;

            ElsIf (EmailVerifyingValue = "Unknown") Then

                        Object.EmailVerifying = Enums.EmailVerifying.Unknown;





GetApiKey() procedure returns us the API key from the Constants.



Function GetApiKey()

            Return Constants.DebounceAPIKey.Get();



EmailOnChange() procedure sets up the “Email verifying” field = “Not Verified” as default after email changing.


EmailOnChange() procedure



Procedure EmailOnChange(Item)

            Object.EmailVerifying = "Not Verified";



That is all, let’s save and update our configuration and see how the Email Verification will work at our 1C system.

Run the 1C in 1C:Enterprise mode, open Tools->Debounce API Key, and put in the “Debounce API Key” field the API key we received at the beginning.


Tools->Debounce API Key

Create a new Client item and fill all information. After Email filling, you will see “Not Verified” as email verifying information.

new Client item

Push the “Verify Email” button. You will receive “Invalid” if an email doesn’t exist.

Push “Verify Email” button

And “Save to Send” if the email exists

Save to Send 

You can download this Example for your own application.

If you have any questions about this article, you can always get answers on our forum:

Stay with us!

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.