Recovery Options
Whenever an User have problems with its credentials (lost, forgotten, compromised) or any kind of password change has to be confirmed using either a E-mail or a Mobile Phone (SMS).
Recover your credentials with e-mail
When the account password is lost, or needs to be changed for any specific reason, the default recovery option is to send a link using the registered e-mail associated with the account needed to be recovered.
The link can be provided by the Mediador and is configured by instance and not bu domain. The url has to receive a token
in its template, for example, the default value is https://testnet.btcore.app/password/:token
.
To send the email based on the user e-mail address:
await bitcapital.users().reset({ email: '[email protected]' });
curl --location --request POST '$API_BASE_URL' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXX' \
--data-urlencode '[email protected]'
Then, when the user is redirected to your application and setup a new password, you'll need to register it using the token provided in the link.
await bitcapital.users().password({token: 'xxxx', passsword: 'xxxx');
curl --location --request POST '$API_BASE_URL' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXX' \
--data-urlencode 'token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
--data-urlencode 'password=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
Customizing the E-mail Template
This featured is deprecated
Enterprise customers may customize the transactional emails sent to their end-users by Bitcapital on your behalf. For this purpose Bitcapital provides a responsive email template with several customizable fields.
To customize the email content, refer to the complete Email Customization reference.
Updated about 4 years ago