Home  >   FAQs   >  How do I use OTP Rules API Save Requests?

How do I use OTP Rules API Save Requests?

Table of Contents

You can use OTP Rules for API Save Requests. 

When saving via APIs, OTP validation is required if the criteria match your configured OTP rule. In such cases, you must send the OTP value and the API request. Follow the below steps to send the OTP value with the API save request.

  • Set up a Workflow to trigger the Send OTP action for the criteria that match API save conditions.
    • Receive OTP via Email, SMS, or WhatsApp and save it.
  • Send the OTP value with the API requests.

The accepted OTP format in APIs is OTPRULES_OTP_(rule id) or OTPRULES_OTP_(sanitized rule name), where all non-alphanumeric characters are removed from the rule name. For example, if the rule name is Test Rule 1 & Test 2 @ XYZ, it becomes TestRule1Test2XYZ.

You can include The OTP value in both request data and headers:

  • Request data should be separated by underscores (for example, OTPRULES_OTP_(ruleid) or OTPRULES_OTP_(sanitized rule name)).
  • Headers data should be separated by hyphens (for example, OTPRULES-OTP-(rule id) or OTPRULES-OTP-(sanitized rule name)).

Note: This is case insensitive, meaning the characters can be in upper case, lower case, or the same case as the name. Headers sent with underscores will be converted to hyphens server-side.

Points to remember:

  • Ensure appropriate trigger conditions to prevent record save issues.
  • OTP Rules don't lock records but prevent entering specified states without OTP verification.
Was this FAQ helpful?
0  out of  0  found this helpful.
Comments 0
Be the first to comment
© Copyright 2023 Vtiger. All rights reserved.