We have to complete the registration by receiving and sending code outlined in the step below
1) Send a registration request with following parameters: a) mobile number as "username". A sms is sent from the backend and the mobile phone receives the sms with code in it.
2) go to code entry screen and enter the sms code that has been received.
Send the same registration GET request with "username" and "email" as code.
If the code is wrong you will get unauthorized exception. If code is right you will get the same code back and you can proceed.
3) Complete the registration by passing in "code" in "email" parameter.