Skip to content

Get User

GET
/api/v1/users/{sub}
curl --request GET \
--url https://api.spartanauth.com/api/v1/users/example

Returns the OIDC profile of a user by their unique sub. Requires the caller to be an admin of the user’s sector or the default sector (if the sector allows user read by non-admins), or the user themselves (proven by a valid transactionID from a recent authentication flow). This endpoint is intended for internal use by the admin settings UI and user profile page.

sub
required
string

A successful response.

Media type application/json
object
sub
string
name
string
givenName
string
familyName
string
middleName
string
nickname
string
preferredUsername
string
profile
string
picture
string
website
string
email
string
emailVerified
boolean
gender
string
birthdate
string
zoneinfo
string
locale
string
phoneNumber
string
phoneNumberVerified
boolean
address
object
formatted
string
streetAddress
string
locality
string
region
string
postalCode
string
country
string
updatedAt
string format: int64
createdAt
string format: int64
Example generated
{
"sub": "example",
"name": "example",
"givenName": "example",
"familyName": "example",
"middleName": "example",
"nickname": "example",
"preferredUsername": "example",
"profile": "example",
"picture": "example",
"website": "example",
"email": "example",
"emailVerified": true,
"gender": "example",
"birthdate": "example",
"zoneinfo": "example",
"locale": "example",
"phoneNumber": "example",
"phoneNumberVerified": true,
"address": {
"formatted": "example",
"streetAddress": "example",
"locality": "example",
"region": "example",
"postalCode": "example",
"country": "example"
},
"updatedAt": "example",
"createdAt": "example"
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}