How to use Verify with Flow Builder
Last updated
Last updated
In this article, we'll show you how to integrate MessageBird's Verify service with Flow Builder.
Log in to your MessageBird Dashboard and navigate to Flow Builder.
Click Create new Flow, then select Templates.
Select the Send verification code template.
In the Webhook step settings, configure your Webhook variables as required. For example, 'recipientEmailAddress' if you want to send verification codes via email, or 'recipientPhoneNumber' for SMS and Voice. Click Save.
Click on the Verify step.
In the step's settings, select the Channel type that you want to use to send the verification code from the drop-down menu. You can choose SMS, Voice, or Email.
In the Recipient field, drag and drop the Webhook variable that you created in step 4 from the Available variables panel.
Fill out the Originator details as required. You can also make changes to the Advanced settings if required.
Check the Message template copy and edit it as required, or leave it with the default text.
Scroll down to the Recieve user input section, and copy the Callback URL. This is the URL that your consumer app will have to invoke once the user inputs their verification code. Read more about the Callback URLs.
Save and publish your flow.
After the callback is invoked, the flow will then continue along the appropriate branch.
Here's how the branches work:
Verified means that the appropriate verification code was received, within the defined timeout interval.
Invalid means that the wrong or empty verification code was received.
Expired means that the verification code was not received within the defined timeout.
Failed means that for some reason we have failed to send the verification code to the user - you should retry the verification procedure or try another verification channel.
Deleted means that within the timeout period a request has been sent to the Verification time to cancel this verification request.
Reference is a metadata field that is usually used to store 3rd party system identifiers - if, for example, you want to crosscheck MessageBird requests with your requests.
Token length can be used to specify a longer token length if the default of 6 characters isn't strong enough. Tokens can be a maximum of 10 digits long.
Datacoding specifies the encoding used for SMS messages. Using a *plain* encoding will make the message take fewer bytes but won't allow for non-Ascii characters. Switching to a *unicode* encoding will support all characters but will increase the size of a character, which could lead to the SMS message being split into multi-part messages.
Timeout can be used to specify the amount of time that the system will wait for the verification code to be submitted. After this timeout expires, the validation request will automatically expire. We recommend setting this to less than 30 seconds.
For SMS verification, the Callback URL should look like this:
Which, at runtime, will look like this:
Note that the recipientPhoneNumber needs to match the phone number of the recipient.
For Voice verification, the Callback URL should look like this:
Which, at runtime, will look like this:
Note that the recipientPhoneNumber needs to match the phone number of the recipient.
For Email verification, the Callback URL should look like this:
Which, at runtime, will look like this:
Note that the recipientEmailAddress needs to match the (first's) recipient's email address.