Get the authenticated principal
Changed onReturns the principal a user access token, a user API key or a service account API key authenticates, and the organization the request acts in.
Request
- Base URLhttps://api.factory.ai
- AuthHTTP bearer
Headers
With true, the answer adds inferenceRegion, isEnterprise and principalKind, and premBaseHostV2 unless the credential is an environment repair credential. Without the header, the answer carries none of them.
A session attribution claim. A claim signed for this principal and organization that has not expired is returned as attribution, unless the signing key cannot be read in time. A claim with a bad signature, signed for another principal or another organization, or expired is ignored.
For a user who can access their root organization, a request without the header, or with one naming an organization the user cannot access, acts in the root organization. An API key acts in its own organization and ignores this header.
Response
Response for status 200
For a user access token or a user API key, the user's ID; for a service account API key, the service account's ID.
For an API key, the key's organization; for a user access token, the organization the request acts in, as X-Factory-Org-Id describes.
human for a user access token or a user API key, service for a service account API key.
Changes
- info
added the optional property
attribution/sharedSessionMemberto the response with the status
- info
- warning
added the new
iosenum value to theattribution/sourceresponse property for the response status
- warning