---
title: "User"
description: "User"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/java/reference/user"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-06"
---

# User

## User

All accounts registered with Contentstack are known as Users. A Stack can have many users with varying permissions and roles.

## activateAccount

The activate\_token a user account call activates the account of a user after signing up.

```
import contentstack;
Contentstack contentstack= new Contentstack.Builder().build();
User user = contentstack.user();
Call<ResponseBody> response = user.activateAccount("activationToken", body).execute()
if (response.isSuccessful){ 
   System.out.println("Response"+ response)
}
```

The activation token is received at the registered email address. You can find the activation token in the activation URL sent to the email address used while signing up.

The body.

## getUser

The "Get user" call returns comprehensive information about an existing user account. The information returned includes details of the stacks owned by and shared with the specified user account.

```
import contentstack;
Contentstack contentstack= new Contentstack.Builder().build();
User user = contentstack.user();
Call<ResponseBody> response = user.getUser().execute()
if (response.isSuccessful){ 
   System.out.println("Response"+ response)
}
```

## login

The "login to your account" request is used to sign in to your Contentstack account and obtain the authtoken.

```
import contentstack;
Contentstack contentstack= new Contentstack.Builder().build();
User user = contentstack.user();
Call<ResponseBody> response = user.login("email", "password", "tfaToken").execute()
if (response.isSuccessful){ 
   System.out.println("Response"+ response)
}
```

Email id for the user.

The password for the user.

The tfa token.

## logout

The "Log out of your account" call is used to sign out the user of the Contentstack account.

```
import contentstack; 

Contentstack contentstack= new Contentstack.Builder().build();
Call<ResponseBody> response = contentstack.logout().execute();
if (response.isSuccessful){ 
   System.out.println("Response"+ response) 
}
```

## logoutWithAuthtoken

The "Log out of your account" call is used to sign out the user of the Contentstack account.

```
import contentstack; 

Contentstack contentstack= new Contentstack.Builder().build();
Call<ResponseBody> response = contentstack.logout("authtoken").execute();
if (response.isSuccessful){ 
   System.out.println("Response"+ response) 
}
```

The authtoken of the user.

## requestPassword

The "Request for a password" call requests a temporary password to log in to an account if a user has forgotten the login password.

Using this temporary password, you can log in to your account and set a new password for your Contentstack account.

Provide the user's email address in JSON format

```
import contentstack; 

Contentstack contentstack= new Contentstack.Builder().build();
Call<ResponseBody> response = contentstack. requestPassword("body").execute();
if (response.isSuccessful){ 
   System.out.println("Response"+ response) 
}
```

The request body.

## resetPassword

The "Reset password" call sends a request for resetting the password of your Contentstack account.

When executing the call, in the 'Body' section, you need to provide the token that you receive via email, your new password, and password confirmation in JSON format.

```
import contentstack; 

Contentstack contentstack= new Contentstack.Builder().build();
Call<ResponseBody> response = contentstack.resetPassword("body").execute();
if (response.isSuccessful){ 
   System.out.println("Response"+ response) 
}
```

The request body.

## update

The "Update User" API Request updates the details of an existing user account. Only the information entered here will be updated; the existing data will remain unaffected.

When executing the API call, under the 'Body' section, enter the user's information that you wish to update. This information should be in JSON format.

```
import contentstack; 

Contentstack contentstack= new Contentstack.Builder().build();
Call<ResponseBody> response = contentstack.resetPassword("body").execute();
if (response.isSuccessful){ 
   System.out.println("Response"+ response) 
}
```

The request body.

## User | Java Management SDK | Contentstack

User represents accounts registered with Contentstack, each with varying permissions and roles, in the Java Management SDK.