Skip to main content

getUser

Getting data of an authorized user 🔐 This method requires authorization.

Users.getUser(langCode)

const value = await Users.getUser()
Schema

langCode: string
lang code
example: en_US

This method sends a request to get the data of an authorized user. Returns the authorized user's data object.

Example return:

{
"id": 1764,
"identifier": "admin1",
"formIdentifier": "regForm",
"authProviderIdentifier": "email",
"groups": [
"group_1"
],
"state": {
"orderCount": 1
}
}
Schema

id: number
object identifier
example: 1764

identifier: string
textual identifier for a field in the record
example: catalog

formIdentifier string
the text identifier of the form linked to the authorization provider
example: , regForm

authProviderIdentifier: string
the text ID of the authorization provider
example: email

groups string[]
An array of values for the text identifiers of the groups that the user belongs to
example:

[ "group_1" ]