[{"label":"Latest (v1.0)","version":"latest"}]
csp

Get Loggedin User

Description

Get principal user information.
Principal user is identified via a token. The token should be passed in a header called csp-auth-token.If expandProfile is passed in the request user profile information will be also returned.

Access Policy

Role User Accounts Service Accounts (Client Credentials Applications)
All Roles ✔️

Request

Request

URL

URL


get
https://{api_host}/csp/gateway/am/api/loggedin/user
Copy

Query Parameters

Query Parameters

string
expand Optional

Indicates if response should be expanded, value is ignored - only the existence of parameter is checked. Includes the address details of the user only if the user is non-federated(vmwareid). If the user is federated, this flag is ignored.

Parameter Serialization Style: FORM Explode:true

string
expandProfile Optional

Indicates if the response should be expanded with the user profile; the value is ignored, only the existence of parameter is checked. Includes the profile details of the user in the userProfile attribute. This userProfile attribute consists of the same output as calling “/am/api/loggedin/user/profile”.

Parameter Serialization Style: FORM Explode:true

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns UserDto of type application/json
{
	"acct": "string",
	"address": "string",
	"city": "string",
	"company": "string",
	"country": "string",
	"countryCode": "string",
	"countryName": "string",
	"customerNumber": "string",
	"email": "string",
	"emailVerified": false,
	"eulaInfo": "string",
	"firstName": "string",
	"lastName": "string",
	"password": "string",
	"refLink": "string",
	"state": "string",
	"stateCode": "string",
	"stateName": "string",
	"tnc": false,
	"tradeId": "string",
	"userId": "string",
	"userProfile": {
		"alternativeEmail": "string",
		"customerNumber": "string",
		"defaultOrgId": "string",
		"isFederated": false,
		"language": "string",
		"linkedUserIdAccount": "string",
		"locale": "string"
	},
	"username": "string",
	"website": "string",
	"workPhone": "string",
	"zipcode": "string"
}
string
firstName Required

The first name of the user.


string
address Required

The address.


string
city Required

The city.


string
company Required

The company.


string
country Required

The country.


string
workPhone Required

The work phone number.


string as email (?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
username Required

The username of the user.


string
password Required

The password. Combination of characters, numbers and special symbols that is hard to guess.


string
lastName Required

The last name of the user.


string
zipcode Required

The ZIP code.


string
eulaInfo Optional

The end-user license agreement information.


boolean
emailVerified Optional

True if the user’s e-mail address has been verified.


string
email Optional

The email address of the user.


string
customerNumber Optional

The customer number.


string
refLink Optional

The reference link to the user profile.


string
state Optional

The user’s state.


string
stateCode Optional

The user’s state code.


string
stateName Optional

The user’s state name.


boolean
tnc Optional

Terms and conditions.


string
tradeId Optional

The trade ID.


string
userId Optional

The unique identifier of the user, on behalf of which the token was issued.


userProfile Optional

Define user profile with default organization, locale and language.


string
countryName Optional

The country name.


string
website Optional

The web site.


string
countryCode Optional

The country code.


string
acct Optional

The identifier of the user, configured to log in to the Identity provider.

Errors

Errors

CspErrorResponse
401

The user is not authorized to use the API


CspErrorResponse
403

The user is forbidden to use the API


CspErrorResponse
404

No user with given token exists


CspErrorResponse
429

The user has sent too many requests


CspErrorResponse
500

An unexpected error has occurred while processing the request

Code Samples

Code Samples

cURL Command

curl https://{api_host}/csp/gateway/am/api/loggedin/user


Feedback

Was this page helpful?