Read User by Token
POST/user-svc/user/by-token
Retrieve user information based on an authentication token.
Responses
- 200
- 400
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
organizations
object[]
Full name of the organization
URL-friendly unique (inside the Singularon platform) identifier for the organization
.
user
object
contacts
object[]
Contacts are used for login and identification purposes.
The unique identifier, which can be a URL.
Example values: "joe12" (singulatron username), "twitter.com/thejoe" (twitter url), "joe@joesdomain.com" (email)
If this is the primary contact method
Platform of the contact (e.g., "email", "phone", "twitter")
Value is the platform local unique identifier.
Ie. while the id
of a Twitter contact is twitter.com/thejoe
, the value will be only thejoe
.
For email and phones the id
and the value
will be the same.
This field mostly exists for display purposes.
Example values: "joe12" (singulatron username), "thejoe" (twitter username), "joe@joesdomain.com" (email)
Whether the contact is verified
Full name of the organization.
URL-friendly unique (inside the Singularon platform) identifier for the user
.
{
"activeOrganizationId": "string",
"organizations": [
{
"createdAt": "string",
"deletedAt": "string",
"id": "string",
"name": "Acme Corporation",
"slug": "acme-corporation",
"updatedAt": "string"
}
],
"user": {
"contacts": [
{
"createdAt": "string",
"deletedAt": "string",
"id": "twitter.com/thejoe",
"isPrimary": true,
"platform": "twitter",
"updatedAt": "string",
"userId": "string",
"value": "thejoe",
"verified": true
}
],
"createdAt": "string",
"deletedAt": "string",
"id": "string",
"name": "Jane Doe",
"passwordHash": "string",
"slug": "jane-doe",
"updatedAt": "string"
}
}
Token Missing
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}