Missing Something?
In this guide, you’ll learn how to view current email address information, what to do to change your password (or if you’ve lost it), and how to remove your current access by invalidating your access token.
Change password
Do you want to change your password? You’re in the right place. You’ll need your current password, and a new one in hand.
HTTP PATCH Request
https://api.sandbox.avenia.io:10952/v2/auth/change-password
Fields
Field | Type | Description |
---|---|---|
currentPassword | string | Your current password. |
newPassword | string | The new password you want to set. |
newPasswordConfirm | string | The same new password to confirm it’s correct. |
Sample JSON Body
{
"currentPassword": "ThoughtMyPasswordWasStrong",
"newPassword": "ThisTimeMyPasswordIsStrong",
"newPasswordConfirm": "ThisTimeMyPasswordIsStrong"
}
cUrl Example
curl -X PATCH "https://api.sandbox.avenia.io:10952/v2/auth/change-password" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "ThoughtMyPasswordWasStrong",
"newPassword": "ThisTimeMyPasswordIsStrong",
"newPasswordConfirm": "ThisTimeMyPasswordIsStrong"
}'
Forgot your password?
If you forgot your password, there’s a two-step process. First, you start the process by informing us that you forgot your password (we’ll confirm you own the email). Then, after receiving the necessary tokens in your email, you’ll complete the process by resetting your password.
Forgot Password (STEP 1)
HTTP Post Request
https://api.sandbox.avenia.io:10952/v2/auth/forgot-password
Field
Field | Type | Description |
---|---|---|
email | string | The email of the access you want to reset the password. |
Sample JSON Body
{
"email": "your.email@provider.com"
}
cUrl Example
curl -X POST "https://api.sandbox.avenia.io:10952/v2/auth/forgot-password" \
-H "Content-Type: application/json" \
-d '{
"email": "your.email@provider.com"
}'
You will then receive an email with the token you passed in, which will be used as the URL path for the next step in the password reset process.
Reset Password (STEP 2)
Now to complete the password reset process, you need to pass the token you received in your email as the URL path and your new password as the JSON body.
HTTP Patch Request
https://api.sandbox.avenia.io:10952/v2/auth/reset-password
URL Path Parameter
Parameter | Type | Description |
---|---|---|
token | string | The reset token received via email. |
Request Body Parameters (JSON)
Fields
Field | Type | Description |
---|---|---|
password | string | The new password you want to set. |
passwordConfirm | string | The same new password to confirm it’s correct. |
Sample JSON Body
{
"password": "ThisTimeMyPasswordIsStrong",
"passwordConfirm": "ThisTimeMyPasswordIsStrong"
}
And that’s it, your password has been successfully reset. Remember to log in again to receive a new access token and everything will work perfectly.
cUrl Example
curl -X PATCH "https://api.sandbox.avenia.io:10952/v2/auth/reset-password/YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"password": "ThisTimeMyPasswordIsStrong",
"passwordConfirm": "ThisTimeMyPasswordIsStrong"
}'
Logout
All done? Do you want to exit and invalidate the access token and refresh token that were saved?
Let’s log out, quite simply:
HTTP POST Request
https://api.sandbox.avenia.io:10952/v2/auth/logout
cUrl Example
curl -X POST "https://api.sandbox.avenia.io:10952/v2/auth/logout" \
-H "Authorization: Bearer eyJhdXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
And that’s it, your current access token and refresh token have been invalidated. To get a new one, log in again.
Conclusion
In this guide, you have learned how to manage authentication and security within the system.
We covered:
- ✅ Requesting a Password Reset – Initiating the password recovery process.
- ✅ Resetting Your Password – Using the email token to set a new password.
- ✅ Changing Your Password – Updating your password while logged in.
- ✅ Logging Out – Ending your session securely.
By following these steps, you now have a structured approach to handling authentication and account security.