exportUserById
Export a single user by ID.
This method exports a single user by its ID.
Signature
This method has the following signature:
exportUserById(options: {userId: string}): Promise<{data: User}>Example
Here is an example of how to use this method:
import {Configuration, ExportApi} from '@croct/export';
async function getUser(): Promise<void> { const api = new ExportApi( new Configuration({ apiKey: '<API KEY>' }) );
const {data: user} = await api.exportUserById({ userId: '6d5f1fe8-3f21-4bce-9afb-e1d11b610674', });
console.log(user);}Parameters
The following list describes the supported parameters:
Return
This method returns the following response:
- userIdstring
The internal ID assigned to the user, unique across the workspace, in UUID format.
- externalUserIdstring|null
The external user ID used to identify the user on the application side.
Always null for anonymous users.
- firstNamestring|null
The user’s first name.
- lastNamestring|null
The user’s last name.
- birthDateinteger|null
The user’s birth date, in milliseconds since epoch.
- genderstring
The user’s gender.
These are the possible values and what they represent:
Value Description MALE Male gender. FEMALE Female gender. NEUTRAL Neither male nor female gender. UNKNOWN An unspecified gender. - emailstring|null
The user’s primary email address.
- alternateEmailstring|null
The user’s alternate email address.
- phonestring|null
The user’s primary phone number.
- alternatePhonestring|null
The user’s alternate phone number.
- addressUserAddress
- avatarstring|null
The URL of the user’s avatar image.
- companystring|null
The user’s company name.
- companyUrlstring|null
The user’s company website URL.
- jobTitlestring|null
The user’s job title.
- activitiesArray<string>
The user’s activities.
- interestsArray<string>
The user’s interests.
- customAttributesobject
Custom attributes associated with the user.
- lastModifiedTimeinteger
The timestamp when the user was last modified, in milliseconds since epoch.
Not updated on sync operations.
- statisticsUserStatistics
If no user matches the given ID, the method throws a resource not found error.