Fetch a list of all the tokens linked to the account of the current user.
This is useful when presenting the user with a comprehensive list of all the tokens linked to their account.
import io.blockv.common.model.Token
import io.blockv.common.internal.net.rest.exception.BlockvException
//returns the current user tokens
blockv.getUserManager().getCurrentUserTokens();
Note: You can access the function through the UserManager
found in your blockv
singleton. See Getting Started
// blockv is the BLOCKv SDK singleton created in getting started
blockv.getUserManager().getCurrentUserTokens()
.subscribe(tokens -> {/*Success*/},
throwable -> {/*Failure*/});
Name | Type | Description |
---|---|---|
userId | String | Unique identifier of the user object that is referenced by the token. |
appId | String | Unique identifier of the application object that created the user token. |
tokenType | String | The type of the token, for example
email
. |
token | String | The value of the token, for example
john.appleseed@blockv.com
. |
isConfirmed | boolean | Flag to indicate if the token is confirmed, for example after the user clicked a verification link in an email. |
isDefault | boolean | Flag to indicate if the token is the primary token. The primary token is used when no other token is explicitly selected, for example to send messages. This will automatically set the
isPublic
flag of an existing token to
false
, because only one token can be the primary token. |