Registration with no password
Tradesmarter offers you 2 registration flows with no password entering in the registration.
That means user can register to the system and get an auto generated password to his email.
You can also chose if you want to auto login the user after registration or redirect him to a login page where he logs in manually using the password he got in the email.
So how can you do it and what needs to be done on your side?
1.General settings:
You should first chose if you want users to be auto logged in after registration or you want user to do manually login – this is a setting that needs to be done on Tradesmarter side.
A. If you chose manual login you have to edit the login page on your site (www.your-brand.com/login).
This page includes the login widget or your own custom login form.
You need to set the redirectUrl parameter in the login widget so user will be redirected wherever you want after registration.
e.g- lets redirect the user to the deposit page after he enter his email and password and logs in:
http://widgets.brand-name.com/en/widget/quick-login?redirectUrl=http://www. brand-name.com/deposit&forgotPasswordUrl=http://www. brand-name.com/forgot-password
B. If you chose auto login you do not need to make any changes in you login page
2. creating the registration flow with auto login to the system:
If you chose the user to be auto logged in after registration with no password, you have 3 options/ways to create the registration section for your brand:
- Using the Tradesmarter registration widget
- Using "soft API call" (creating your own html form and posting the fields to a dedicated url as you will see later on in this document)
- Make a server side registration by posting all inputs the same way as in option 2 above.
2.1 Using the Tradesmarter widget:
- In order to activate the registration with no password all you need to do is to set the widget parameter "hidePassword" to "1".
- You will also need to use the "redirectUrl" parameter to pint the user to the page you want him to be redirected after registration (we do this setting on the Tradesmarter side but when using the parameter you can over ride the default settings and chose another page to redirect the user to)
E.G:
let's use the no password option and redirect the user to the deposit page:
http://widgets.brand-name.com/widget/registration?hidePassword=1&redirectUrl=https://www.brand-name.com/deposit
this way when the user submit the registration form he will:
- be registered
- get an auto generated password to his email
- logged in to the site
- redirected to the deposit page
2.2 Using "soft API call"
Soft API registration do not require any login to the tradesmarter API, it is very simple and easy to implement:
A. you will have to create your own HTML form with all mandatory fileds for registration (you can refer to this link and download the attachment in the page:
https://tradesmarter.desk.com/customer/portal/articles/2033519-custom-registration-form)
B. you will have to post all of the input values by chaining them in the "action" filed of the form to this url:
https://trading. brand-name.com/index/sign-up
C. you will have to include the redirectUrl parameter so the user will end up in your desired page
E.G, lets register a user with no password and redirect him to the deposit page:
<form action="https://trading. brand-name.com/index/sign-up?redirectUrl=https://www. brand-name.com/deposit"...
*check that registration was successful and user Email doesn't exist in the system:
you also have an option to first fire an Ajax call to the Tradesmarter server, make sure user can register (and that his email doesn't already exist in the system).
1. make an Ajax call with all user details passed as URL parameters, E.G:
2. if the Ajax call was successes (you can also get different details from the server response to a success registration), all you have to do is to redirect the user to any page you want (he will be automaticly logged in)
3. if the Ajax call returned a fail error - you can display the user with an Error message that says his email already exist in the system
2.3 server side registration:
you have an option to use your own custom html form for registration, but his time you can "hold" and save all of the user details in the registration form on your database and only when you are ready and when you want you can actually register the user.
This can be handy when having landing pages but you want to send the leads and register the user only when you are ready.
The process here is the same as with "soft API call" in the above section, only that you need to to it on the server side:
- get all saved user inputs
- Post them to the same url : https://trading. brand-name.com/index/sign-up
- chain all of the inputs
- use the redirectUrl parameter
- You can use CURL or any other method to post the url with all the parameters,This is how the url should look like:
https://trading.brand-name.com/index/sign-up?firstName=TestName&lastName=TestLastName&email=TestAccount@mailinator.com&country=be&locale=fr_BE&phone=123456789&redirectUrl=https://www.brand-name.com/deposit
** you can also include the a_aid parameter to associate the user with the referring affiliate.
3.creating the registration flow with manual login to the system:
all process is the same as in the auto confirm flow only everytime you are using the url parameter you need to redirect the user to the login page so after he register :
- user will be redirected to you login page
- user will get an auto generated password by email
- user will enter his email and password to the login page
- user will be redirected after login according to the redirectUrl parameter you have set to the Login widget or in you custom soft API login (login and not registration)