I think the Fonenode IVR service is a preferred option:
The One Time Password (OTP) resource helps you quickly authenticate users on your platform with their mobile numbers. The user receives a call immediately bearing his code as the caller id, when the user picks, the call is hungup.
You should store the response from calling this API, as the code in the response is the same number that calls the user.
- Create An OTP
Create a 5 digit OTP code and fires a call (a flash actually) to the desired number.
to: Number to make an OTP call to. Must be in International format. E.g 234811056859
code (Optional): 5-6 digit code to use as OTP code, if not supplied, a default 5 digit code will be auto generated. E.g 12345