Account Creation and Deletion

Creating User Account

To create a new user account, the following information is typically required:

  • email (required): The email address of the user
  • password (required): The password of the user
  • language (required): The language of the user
val request = CreateUserRequest(
  email = "test@example.com", // The email address of the user
  password = "password", // The password of the user
  language = "en" // The language of the user. Currently supported languages are "en", "de", "zh", "es", "fr", "it", "ru", "pt".
)
InstaVision.userServices.signup(
  request = request,
  onSucess = { user ->
    // The user object contains the user details
  },
  onError = { apiError ->
    // The error object contains the error code and message
  }
)

Deleting a User Account

Pre-requisite: The user has to be signed in to perform the following operations.

To delete a user account, the user should be logged in.

InstaVision.userServices.deleteAccount(
  onSuccess = {
    // The user account is deleted
  },
  onError = { apiError ->
    // The error object contains the error code and message
  }
)