Gets the user details of the user making the request

GET /api/profile

Retrieves the user details for the user making the request through the Auth0 Id contained in its access token.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • account_id string

      ID of the account the user is associated to

    • auth0_id string

      Auth0 id of the user

    • completed_onboarding boolean

      Whether the user has completed their onboarding or not.

    • email string

      Authenticated User's email

    • role string

      Authenticated user's role

    • user_id string

      ID of the User

    • user_name string

      Name of the user

  • 400 application/json

    Bad Request

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

GET /api/profile
curl \
 --request GET 'http://localhost:4000/api/profile' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "role": "customer_read_only",
  "email": "joe@example.com",
  "user_id": "33b964ce-b1fa-47fa-a97d-0c8c0c56ed6c",
  "auth0_id": "auth0|47fa-a97d-0c8c0c56ed6c",
  "user_name": "Joe Smith",
  "account_id": "0e0c22e9-334b-4a86-bafb-63055a0300dd",
  "completed_onboarding": true
}
Response examples (200)
{
  "role": "customer_read_only",
  "email": "joe@example.com",
  "user_id": "33b964ce-b1fa-47fa-a97d-0c8c0c56ed6c",
  "auth0_id": "auth0|47fa-a97d-0c8c0c56ed6c",
  "user_name": "Joe Smith",
  "account_id": "0e0c22e9-334b-4a86-bafb-63055a0300dd",
  "completed_onboarding": true
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}