User / Me
Retrieve the authenticated user's data.
Interact with this API using a GET
request only with your Token in headers. It informs you about the user's authentication status. If authenticated, the user's data is returned.
API Endpoint
The following endpoint/URL should be used in order to access this API:
https://admin.gpt4business.ai/en/user/api/v1/me/
Request Headers
The API must have the following request headers:
Content-Type: application/json
Authorization: Token <Your-API-Token>
Response Example
Here's an example of the response:
JSON
{
"message": "You are successfully logged in.",
"data": {
"id": 1241,
"email": "[email protected]",
"first_name": "John",
"last_name": "Smith"
}
}
Error Handling
It's essential to handle any non-200 status codes (e.g., 400, 404, 500) returned by the API. In the event of an error, the API will provide a structured response as shown below:
JSON
// Response when no token is provided
{
"detail": "Authentication credentials were not provided."
}
Last updated
Was this helpful?