API

Common

Getting Started
Errors and Codes

User

Register
Login
Get User Profile
Update Profile
Upload Avatar
Reset Password
Logout
Get Public User Profile

User Token

List Tokens
Add Token
Delete Token
Set Default Token
Verify Token
Reset Verification

User vAtom

Get vAtoms by IDs
Get vAtom Inventory
Search vAtoms
Get Actions
Perform Actions
Trash vAtom

User Activity

Get My Threads
Get My Thread Messages
Send Message

Map

Geo Discover vAtoms
Geo Discover vAtom Groups

Update Stream

Web Socket

Face Infrastructure

Face View Registration
Vatom View
Face Selection Procedure

Reset Password

Overview

Trigger the password reset process for any token belonging to the current user.

There are two use cases for the resetToken() methods:

  1. Forgot password

    • The user has forgotten their password and would like to set a new one.
  2. Login without a password

    • The user has not yet set a password and would like to receive an secret credential to use as a password.

Require imports

import io.blockv.common.internal.net.rest.exception.BlockvException
import io.blockv.core.client.manager.UserManager.TokenType

Request

//reset token
blockv.getUserManager().resetToken(/*token,token-type*/)

Note: You can access the function through the UserManager found in your blockv singleton. See Getting Started

Example

Reset user token email

// blockv is the Blockv sdk singleton created in getting started
blockv.getUserManager()
      .resetToken("john.doe@example.com", UserManager.TokenType.EMAIL)
      .subscribe(() -> {/*Success*/},
      throwable -> {/*Failure*/});

Reset user token phone number

// blockv is the Blockv sdk singleton created in getting started
blockv.getUserManager()
      .resetToken("+11234567890", UserManager.TokenType.PHONE_NUMBER)
      .subscribe(() -> {/*Success*/},
      throwable -> {/*Failure*/});
©2020 BLOCKv
Info