Skip to main content
GET
/
whoami
Get a current user
curl --request GET \
  --url https://api-dev.narrative.io/whoami \
  --header 'Authorization: Bearer <token>'
{
  "user_id": 407,
  "name": "John Doe",
  "company_access_list": [
    1
  ],
  "current_company_scope": {
    "company_id": 1,
    "slug": "narrative",
    "name": "Narrative, Inc (id 1!)",
    "short_description": "Another New Short Description",
    "long_description": "Narrative Long Description",
    "contact_email": null,
    "website": "https://app-dev.narrative.io/",
    "data_shop_url": "https://shop.nicks.io/",
    "twitter_link": "https://twitter.com/narrative_io",
    "linkedin_link": "https://www.linkedin.com/company/narrative-io",
    "image_url": null,
    "status": "active",
    "visibility": "visible"
  },
  "created_at": "2022-11-29T21:42:24.978707Z",
  "created_by": null,
  "last_updated_at": null,
  "last_updated_by": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json

OK

user_id
integer

The user id

name
string

Name of the user

company_access_list
integer[]

Companies that could be accessed by the user.

current_company_scope
object
Example:
{
"company_id": 42,
"slug": "acm",
"name": "ACM",
"long_description": "The Acme Corporation is an ironic name for the fictional corporation, appearing in the Road Runner/Wile E. Coyote animated shorts, where it was used as a running gag.",
"short_description": "American Company that Manufactures Everything",
"contact_email": "[email protected]",
"data_shop_url": "https://shop.acm.io",
"twitter_link": "https://twitter.com/acm_company",
"linkedin_link": "https://www.linkedin.com/company/acm_company",
"image_url": null,
"visibility": "visible",
"status": "active",
"website": null
}
permissions
object[]
created_at
string

The instant this company was created.

Example:

"2021-06-24T00:54:40.029056Z"

created_by
string

Contact of user who created the company

last_updated_at
string

The instant this company was created.

Example:

"2021-06-24T00:54:40.029056Z"

last_updated_by
string

Contact of user who updated the company