GET {{NEXT_PUBLIC_API_BASE_URL}}/api/user
Get Current User
Retrieves of the currently authenticated user’s details.
Request Headers
None.
Request Body
None.
Responses
200
Returns the currently authenticated user’s details.
Example:
{
"id": 1,
"email": "[email protected]",
"first_name": "",
"last_name": "",
"password": "$2b$12$6APqdTz6usybpOylyxFr3OEbI8kAqXJ2TM.vq3ywKsRL1TVrFN9t.",
"conversations": [
{
"id": 8,
"email": "[email protected]",
"URLs": [
"https://en.wikipedia.org/wiki/Circular_reasoning",
"https://helpfulprofessor.com/circular-logic/"
],
"created_at": "Tue, 26 Nov 2024 21:11:20 GMT",
"role": "Psychologist or Academic Researcher",
"intent": "The user is likely exploring the URLs to gain a deeper understanding of circular logic, particularly its implications in psychology and how it manifests in everyday reasoning, despite not being interested in the relationship between premises and conclusions."
}
]
}
401
No user is signed in or the session has expired.
Example:
{
"message": "User not signed in"
}
400
An error occurred while attempting to retrieve the authenticated user’s details.
Example:
{
"message": "Error getting user information",
"error": "Some descriptive error message"
}
Last updated on